Description:
My grid is bound to a data collection. A collection row object has a property, which is an object with its own properties: the row object is Person and it has an Address property, which in turn has City, Street and Zip properties. I would like to display and edit the sub-properties of the Address object in grid columns. Is this possible?
Answer:
Currently, you can set complex FieldNames for columns like Person.Adress.Street and don't have to implement the ITypedLIst interface. All information below concerns the old versions of our controls.
You should create a property descriptor and type converter classes for your data and implement the ITypedList interface for the list object. The attached sample project demonstrates how to display and edit the City property of the Address object in the grid. Additional information on the PropertyDescriptor and TypeConverter classes can be found in the MSDN Library.
You could consider using oureXpress Persistent Objects product or LINQ in VS 2008. XPO and LINQ already implement all the interfaces required to display complex properties in data bound visual controls.
See Also:
How to display a complex property's subproperties in data bound controls
Specifics of binding to properties of type persistent object
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.
Hello . Can you explain me a bit more on how it works internally while using something like Person.Adress.Street .I am plannig to use on a heavy grid which is updated quite often .But if internall complex binding uses reflection or something similar I will look into some other options on my side to display data so that my performance is not impacted
Hello,
To process your recent post more efficiently, I created a separate ticket on your behalf: T245390: How nested properties are handled by a grid. This ticket is currently in our processing queue. Our team will address it as soon as we have any updates.