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. Image for the cookie policy date

GridListControlCell Dropdown Datasource

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

1 Reply

AD Administrator Syncfusion Team 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;
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon