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. Image for the cookie policy date

manipulate columns on lower hierarchy

Hi, I have got 2 hierarchies of datatable formatted in an ExpandGrid strucutre in BoundDataGrid. I can set properties such as header text of the root hierarchy by, this.gridDataBoundGrid1.Binder.GridBoundColumns however how can i manipulate on the dataColumns of the lower hierarchy? can i only show the headers of the lower hierarchy but not those in the root hierachy? Thanks for help

1 Reply

AD Administrator Syncfusion Team April 19, 2004 06:23 PM UTC

Hi Vincent, You can access the child levels with the GridHierarchyLevel class. Here is some code that sets the child and grand child''s columns header text and the celltype(style property). GridHierarchyLevel hlParentToChild = this.gridDataBoundGrid3.Binder.AddRelation("ParentToChild"); GridHierarchyLevel hlChildToGrandChild = this.gridDataBoundGrid3.Binder.AddRelation("ChildToGrandChild"); GridHierarchyLevel hlParent = this.gridDataBoundGrid3.Binder.RootHierarchyLevel; hlParentToChild.InternalColumns["childID"].HeaderText = "NewChilID"; hlParentToChild.InternalColumns["childID"].StyleInfo.CellType = "ComboBox"; hlChildToGrandChild.InternalColumns["GrandChildID"].HeaderText = "NewGrandChildID"; hlChildToGrandChild.InternalColumns["GrandChildID"].StyleInfo.CellType = "ComboBox"; You can hide the child level header''s by setting the showheaders property. hlParentToChild.ShowHeaders = true; hlChildToGrandChild.ShowHeaders = true; But to hide the parent header, you can just hide that particular header row. this.gridDataBoundGrid3.Model.Rows.Hidden[0] = true; Attached is a sample showing this implementation. Regards, Jay N. TripleMasterDetailGrid1_8668.zip

Live Chat Icon For mobile
Up arrow icon