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

how to get rid of the header in a drop-down grid list control?

i have a gridcontrol and some cells in it have drop-down grid list control, but i don't want the column headers to be displayed when the list drops down, how do i get rid of those headers thanks!

1 Reply

AD Administrator Syncfusion Team June 5, 2003 07:37 PM UTC

Since the same GridListControl is used for any cell that has the GridListControl celltype, you have to do this on a cell by cell basis (in general). One way is to catch the CurrentCellShowingdropDown event and set it there if the cell being dropped is a GridListControl.
private void grid_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
	GridCurrentCell cc = this.gridControl1.CurrentCell;
	GridDropDownGridListControlCellRenderer cr = cc.Renderer as GridDropDownGridListControlCellRenderer;
	if(cr != null)
	{
	         cr.ListControlPart.ShowColumnHeader = false;
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon