Hi,
I have a scenario where I have an editable non-root listView. Depending on the state of the root object, I want certain columns to be read-only (initially they are set as readOnly=false in the model editor for the initial data entry). I know I can set the column.OptionsColumn.ReadOnly = true in ControlsCreated. I am wondering if that is the best approach or if there is some way to set it using XAF objects (as is the case on a detail view for PropertyEditor.ReadOnly).
Thanks,
Mark
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hi Mark,
You can manage the ReadOnly property for an appropriate node in the application model (see the attached image) or do this in the way you suggested.
Please refer to the following article to see how to access the application model via code: How to: Access the Application Model in Code.
Also, note that by using classes from the DevExpress.ExpressApp.NodeWrappers namespace you can achieve your task more easily. For instance, see the How to: Implement a Detail View Item topic for sample code showing the main idea on how to do this.
Please contact us in case of any difficulty.
Thanks
Dennis
Hi Dennis,
In this case the readonly property is dynamic (as in it changes over time with respect to the business data) so I don't want to alter the business model. I was just wondering about best practice. I will implement it via the grid then.
Thanks,
Mark
Hi Mark,
I believe I've answered to this question in the readonly certain columns for certain rows in a list view grid issue. Feel free to ask additional questions.
Thanks,
Marina
Hi Marina,
Yes, thank you.
MK