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.
Unfortunately, activation email could not send to your email. Please try again.

Nested properties of strong-typed collection item in GridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

14606 Jun 1,2004 01:41 AM Jun 2,2004 09:10 AM Windows Forms 5
loading
Tags: GridControl
Günter Schwaiger
Asked On June 1, 2004 01:41 AM

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 02:00 PM

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 1, 2004 11:54 PM

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 06:30 AM

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 08:23 AM

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 09:10 AM

I think creating a DataView should be the easiest. Stefan

CONFIRMATION

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.

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.

;