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

Exclusive Combo Box click

Hi, I''ve noticed that when I click on a cell to select (the cell not the arrow) which has a cell type of ComboBox and the DropDownStyle set to Exclusive, it drops down. Is there a simple way of preventing it from automatically dropping down when I click on the cell? Thanks, Sue

1 Reply

AD Administrator Syncfusion Team March 1, 2005 11:35 PM UTC

There is no property to control this. You can handle some events and prevent the drop. Here is code that worked for me in the ComboBoxCells sample.
bool clickOnCell = false;
private void gridControl1_CellClick(object sender, GridCellClickEventArgs e)
{
	this.clickOnCell = true;
}
private void gridControl1_CurrentCellMoving(object sender, GridCurrentCellMovingEventArgs e)
{
	this.clickOnCell = false;
}
private void gridControl1_CurrentCellShowingDropDown(object sender, GridCurrentCellShowingDropDownEventArgs e)
{
	if(clickOnCell)
	{
		e.Cancel = true;
		this.clickOnCell = false;
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon