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.

GridListControlCell Dropdown Datasource

Thread ID:

Created:

Updated:

Platform:

Replies:

18855 Sep 10,2004 08:29 AM Sep 10,2004 08:58 AM Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 10, 2004 08:29 AM

I was wondering if there is a way in which I can dynamically set the datasource for a dropdown of a GridListControlCell at runtime. In the past I have used the CurrentCellShowingDropDown event for combobox cells, but was wondering if I can do a similar thing for list control cells. Thanks

Administrator [Syncfusion]
Replied On September 10, 2004 08:58 AM

You can do the same kind of thing. Here is a snippet that shows how to get at the GridListControl object so you can work directly with it in CurrentCellShowingDropDown.
private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	//the cell 2, 4 is where I want to hide coulmn 1
	if(cc.ColIndex == 2 && cc.RowIndex == 4) 
	{
		GridDropDownGridListControlCellRenderer cr = (GridDropDownGridListControlCellRenderer) cc.Renderer;
		GridListControl glc = cr.ListControlPart;
		glc.Grid.Cols.Hidden[1] = true;
	}
}

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.

;