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.

Hiding Columns in NestedTables

Thread ID:

Created:

Updated:

Platform:

Replies:

17204 Aug 3,2004 09:48 AM Aug 4,2004 09:12 AM Windows Forms 2
loading
Tags: Grouping
Jeremy Cupit
Asked On August 3, 2004 09:48 AM

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.

Administrator [Syncfusion]
Replied On 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

Jeremy Cupit
Replied On 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 >

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.

;