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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Exclusive Combo Box click

Thread ID:

Created:

Updated:

Platform:

Replies:

25590 Mar 1,2005 11:10 PM UTC Mar 1,2005 11:35 PM UTC WinForms 1
loading
Tags: GridControl
Sue Harris
Asked On March 1, 2005 11:10 PM UTC

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

Administrator [Syncfusion]
Replied On 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;
	}
}

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

;