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

Hiding Columns in NestedTables

Hi, I have a GridGroupingControl which I am using to display an Nth level nested DataSet. Once I have set the DataSource and DataMember properties of the Grid to the DataSet and Table[0].TableName, how can I hide all the Columns in all the nested tables that I don''t want displyed. My aim is to get the Grid to look as similar as possible to a TreeView type control with extra hidden data in each DataRow which I can access when the row is selected. Therefore I only want the "description" column to be visible to the user, and not all the other value columns.

2 Replies

AD Administrator Syncfusion Team August 4, 2004 08:12 AM

Hi Jeremy, you would have to step into the RelationDescriptors and use the RelationDescriptor.ChildTableDescriptor to get access to the nested table schema. See following example: // main table descriptor GridTableDescriptor td = this.gridGroupingControl1.TableDescriptor; // nested table descriptor while (td.Relations.Count > 0) { GridTableDescriptor td = td.Relations[0].ChildTableDescriptor; // hide columns in nested table td.Columns.Clear(); td.Columns.Add("Description"); } Stefan


JC Jeremy Cupit August 4, 2004 09:12 AM

Thx Stefan that is just the job... ;-) >Hi Jeremy, > >you would have to step into the RelationDescriptors and use the RelationDescriptor.ChildTableDescriptor to get access to the nested table schema. > >See following example: > > > > // main table descriptor > GridTableDescriptor td = this.gridGroupingControl1.TableDescriptor; > > // nested table descriptor > while (td.Relations.Count > 0) > { > GridTableDescriptor td = td.Relations[0].ChildTableDescriptor; > > // hide columns in nested table > td.Columns.Clear(); > td.Columns.Add("Description"); > } > > > >Stefan >

Loader.
Live Chat Icon For mobile
Up arrow icon