How to hide specific column from child table

Hi,
I am using Gridgrouping control.
I have Parent-Child Relationship in the control.

I want to hide specific column from child table 

Please give me solution regarding to this.

Thank you and Regards,
Supriya

1 Reply

MK Muthukumar Kalyanasundaram Syncfusion Team January 7, 2015 04:36 AM UTC

Hi Supriya,

 

Thank you for your interest in Syncfusion products.

 

 

 

Query 1

 

how to hide specific column from child table ?

 

Suggestion 1:

 

You can use “GridTableModel” class object to hide the specific column from child table in a grid by using “HideCols” property. Please refer the below code,

 

Code:

GridTableModel tablechild = this.gridGroupingControl1.GetTableModel("Orders"); // child Table

tablechild.HideCols[2] = true;  // hide specific column

 

 

Suggestion 2:

 

You can use the “QueryColWidth” event to hide the specific column from child table in a grid. Please refer the below code,

 

Code:

GridTableModel tablechild = this.gridGroupingControl1.GetTableModel("Orders");  // child Table

tablechild.QueryColWidth += new GridRowColSizeEventHandler(tablechild_QueryColWidth);

void tablechild_QueryColWidth(object sender, GridRowColSizeEventArgs e)

 {

  if (e.Index == 2) // hide specific column

   {

    e.Size = 0;

    e.Handled = true;

   }

 }

 

 

Please let us know if you have any concern.

 

Regards,

Muthukumar K


Loader.
Up arrow icon