We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Nested properties of strong-typed collection item in GridGroupingControl

Thread ID:





14606 Jun 1,2004 05:41 AM UTC Jun 2,2004 01:10 PM UTC WinForms 5
Tags: GridControl
Günter Schwaiger
Asked On June 1, 2004 05:41 AM UTC

I have a OrderItem object that has a Product property and I want to show nested properties like Product.Id, Product.Name and so on in a GridGroupingControl. I defined the column this way: new GridColumnDescriptor(new FieldDescriptor("Product", "Product.Description", false, ""), "Description") If I do so only the class name (Product.ToString() output) is displayed.

Administrator [Syncfusion]
Replied On June 1, 2004 06:00 PM UTC

With the existing code this is not supported at the moment. But we consider this a pretty important feature and should soon have something working. Thanks, Stefan

Günter Schwaiger
Replied On June 2, 2004 03:54 AM UTC

Thank you. Now I have to start at the beginning. Do you know a way to display a class hirarchy with different headers for each child element and +/- for (un)collapsing the tree? We use only objects to hold our order informations.

Administrator [Syncfusion]
Replied On June 2, 2004 10:30 AM UTC

When you say different headers. Do you mean different fields to be displayed or do you just want to change the header text? I mean, if you do have that collection with nested objects, are the nested objects all of the same type with same columns and you only want to display different column headers or is it different columns for each object? Regarding support for nested properties: I can get back to you once we have support for the nested properties working. This should be available with a patch in a couple of weeks. One way to work around this limitation with grouping grid could be in the meantime to implement wrapper class derived from IEditableObject that exposes the nested properties as public properties. In the public property implementations you could then get and set the value from your underlying object. See the StrongTypedCollection example how to implement IEditableObject. Thanks, Stefan

Günter Schwaiger
Replied On June 2, 2004 12:23 PM UTC

Thank you. What we want to display in the grid is a Order with a collection of OrderItem. An OrderItem can hold a single Product or a Package (Collection of Protuct). So the OrderItems should have a different header as the list of Product in it. All this classes implent the IEditableObject interface. I defined all the relations in GridGroupingControl and this object tree with it different headers are shown correctly, but the nested properties did not work (not implemented yet). There is not enough time to write wrapper classes, I think we try to save the objects in XML and load it in a DataView. Any better idea?

Administrator [Syncfusion]
Replied On June 2, 2004 01:10 PM UTC

I think creating a DataView should be the easiest. Stefan


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon