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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Hide columns in GridListControl

Thread ID:





76229 Aug 28,2008 04:09 AM UTC Aug 29,2008 11:42 AM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On August 28, 2008 04:09 AM UTC

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 11:42 AM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon