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

How to hide columns in GridListControl

Thread ID:





92366 Jan 10,2010 12:55 PM UTC Jan 11,2010 01:39 PM UTC WinForms 1
Tags: GridControl
Ruslan Gasanbekov
Asked On January 10, 2010 12:55 PM UTC


I got GridListControl which placed inside GridGroupingControl.
I bind the grid with DataSource as followed:

private void gridGrpCtrlAssignEmps_TableControlCurrentCellActivated(object sender, GridTableControlEventArgs e)
GridDropDownGridListControlCellRenderer dropDownRenderer = cc.Renderer as GridDropDownGridListControlCellRenderer;

if (dropDownRenderer != null)
if (column.Name == this.m_Dictionary["SignIn"])
GridListControl listControlSignIn = dropDownRenderer.ListControlPart;
listControlSignIn.DataSource = this.getClockSignList(clockSignList, "SignIn");
listControlSignIn.DisplayMember = this.m_Dictionary["SignIn"];
listControlSignIn.ValueMember = this.m_Dictionary["SignIn"];

listControlSignIn.Click += new EventHandler(listControlSignIn_Click);

I would like to hide some of the binded columns when the drop down is opened.
How can it be achived?

Rajadurai C [Syncfusion]
Replied On January 11, 2010 01:39 PM UTC

Hi Ruslan,

Thanks for your interest in Syncfusion Products.

To hide some of the columns in the dropdownlist while showing, you can make use of the HideCols of the Grid through the ListControlPart object. Here is the code that can be handled in TableControlCurrentCellActivated event for your reference.

GridCurrentCell cc = e.TableControl.CurrentCell;
GridDropDownGridListControlCellRenderer rend = cc.Renderer as GridDropDownGridListControlCellRenderer;
GridDropDownGridListControlPart part = rend.ListControlPart as GridDropDownGridListControlPart;
part.DataSource = listTable();
part.DisplayMember = "State";
part.ValueMember = "City";
part.Grid.HideCols[3] = true; //code used to hide certain column in dropdownlist



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