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.

manipulate columns on lower hierarchy

Thread ID:





13030 Apr 19,2004 07:23 AM Apr 19,2004 02:23 PM Windows Forms 1
Tags: GridControl
Vincent Lo
Asked On April 19, 2004 07:23 AM

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

Administrator [Syncfusion]
Replied On April 19, 2004 02:23 PM

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


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.