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 12:58 PM UTC

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.
Up arrow icon