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.

Hide columns in GridListControl

Thread ID:





76229 Aug 28,2008 12:09 AM Aug 29,2008 07:42 AM Windows Forms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On August 28, 2008 12:09 AM

I have a GridDataboundgrid control, in which one cell has type gridlistcontrol.this GrirListcontrol is bound to a Datatable.this datatable has four columns. but i need to show only two of them in Gridlistcontrol. how can i hide the other columns. now its showing all the columns in Datatable.

Sri Rajan [Syncfusion]
Replied On August 29, 2008 07:42 AM

Hi Leena,

Thank you for your interest in Syncfusion products.

You need to set QueryColWidth event, then set e.Size as 0 and e.Handled as true

to hide a column in GridListControl. Here is the sample code which explains this


this.gridListControl1.Grid.QueryColWidth += new


void Grid_QueryColWidth(object sender,

Syncfusion.Windows.Forms.Grid.GridRowColSizeEventArgs e)
if (e.Index > 2)
e.Size = 0;
e.Handled = true;

Please let me know if this helps.

Best Regards


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.