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.

How to hide specific column from child table

Thread ID:

Created:

Updated:

Platform:

Replies:

117893 Jan 6,2015 03:58 AM Jan 6,2015 11:36 PM Windows Forms 1
loading
Tags: GridGroupingControl
Supriya Varne
Asked On January 6, 2015 03:58 AM

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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On January 6, 2015 11:36 PM

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


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.

;