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

Hide Columns - child and grandChild

Desire to occult a column of grandchild that I load in execution time. for the initial table that reference parent not meeting difficulties. how I execute in child and grandchild?


3 Replies

JJ Jisha Joy Syncfusion Team January 29, 2009 09:20 AM UTC

Hi Nabia,

Please try this code snippet to hide a column in nested table:


GridTableDescriptor td = this.gridGroupingControl1.GetTableDescriptor("ChildTable");
td.VisibleColumns.Remove("Name");


Please let me know if this helps.

Regards,
Jisha



AD Administrator Syncfusion Team February 3, 2009 05:26 PM UTC

I inserted the code as it was indicated and occurs this error:

'Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl' does not contain a definition for 'GetTableDescriptor'



RP Rekha P Syncfusion Team February 5, 2009 08:29 AM UTC

Hi Nabia,

Thank you for your interest in Syncfusion Products.

Please refer the below code snippet to hide the column in child table.

[C#]

GridTableDescriptor childTableDescriptor = (GridTableDescriptor)GridGroupingControl1.TableDescriptor.Relations[0].ChildTableDescriptor;
childTableDescriptor.VisibleColumns.Remove("childID"); // childID, ChildTable column name.


Also please refer the sample below which illustrates the above.

http://websamples.syncfusion.com/samples/Grid.Web/7.1.0.21/F79281_HideChildTableColumn/main.htm

Please let me know if this helps you.

Thanks,
Rekha


Loader.
Live Chat Icon For mobile
Up arrow icon