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 columns in GridListControl

Thread ID:

Created:

Updated:

Platform:

Replies:

92366 Jan 10,2010 07:55 AM Jan 11,2010 08:39 AM Windows Forms 1
loading
Tags: GridControl
Ruslan Gasanbekov
Asked On January 10, 2010 07:55 AM

Hi,

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 08:39 AM

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


Regards,
Rajadurai

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.

;