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

GridListControlCell Dropdown Datasource

Thread ID:

Created:

Updated:

Platform:

Replies:

18855 Sep 10,2004 12:29 PM UTC Sep 10,2004 12:58 PM UTC WinForms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 10, 2004 12:29 PM UTC

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 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;
	}
}

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.

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

;