Hello,
I'm using the hierarchical gridview with an object-relational datasource (programatically).
I'm displaying a list of order Items which have the property "ParentOrderItem".
Every item with a parent order item is displayed as a child row. Everything works fine.
What I want to do is copying the formatting of the gridview (done via Property Bilder - saying which columns to be shown, which header texts, ...) to the format of the child rows, since they alway show the same entities. This would help me doing the same work only once.
Here is the code where I set up my hierarchy:
Thanks for any help on this matter.
Stefan
I'm using the hierarchical gridview with an object-relational datasource (programatically).
I'm displaying a list of order Items which have the property "ParentOrderItem".
Every item with a parent order item is displayed as a child row. Everything works fine.
What I want to do is copying the formatting of the gridview (done via Property Bilder - saying which columns to be shown, which header texts, ...) to the format of the child rows, since they alway show the same entities. This would help me doing the same work only once.
Here is the code where I set up my hierarchy:
//orderItemsgrid.DataSource is "theOrder.SD_Order_Items"
GridViewTemplate template = new GridViewTemplate();
template.DataSource = theOrder.SD_OrderItems;
orderItems_grid.MasterTemplate.Templates.Add(template);
GridViewRelation relation = new GridViewRelation(orderItems_grid.MasterTemplate);
relation.ChildTemplate = template;
relation.RelationName = "OrderItemOrderItem";
relation.ParentColumnNames.Add("OrderItemID");
relation.ChildColumnNames.Add("ParentOrderItem");
orderItems_grid.Relations.Add(relation);
Thanks for any help on this matter.
Stefan