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.
Unfortunately, activation email could not send to your email. Please try again.

Prevent selection of next item on combobox cell doubleclick?

Thread ID:





96669 Sep 27,2010 09:09 AM Oct 6,2010 09:09 AM ASP.NET Web Forms (Classic) 2
Tags: GridGroupingControl
Maxim Software Systems
Asked On September 27, 2010 09:09 AM

Is there a way to prevent a grid cell whose CellType is "ComboBox" from selecting the next item in its DataSource when the cell is double-clicked?

Maxim Software Systems
Replied On September 28, 2010 11:41 AM

Sorry, I didn't realize this was under the ASP.NET forums.

Nirmal Raja [Syncfusion]
Replied On October 6, 2010 09:09 AM


Thank you for your interest in Syncfusion products.

The double clicking of the combo box cell which changes the values can be canceled by overriding the OnEditPartMouseDown and OnDoubleClick from the GridComboBoxCellRenderer, then add the renderer to the current grid's combo box cell renderer.

Please refer the code below:
//Assigning the custome renderer
gridControl1.CellRenderers["ComboBox"] = new CustomDropDownRenderer(gridControl1, gridControl1.CellModels["ComboBox"]);

//The custome renderer class
public class CustomDropDownRenderer : GridComboBoxCellRenderer
public CustomDropDownRenderer(GridControlBase grid, GridCellModelBase model)
: base(grid, model)
protected override void OnEditPartMouseDown(object sender, MouseEventArgs e)
//base.OnEditPartMouseDown(sender, e);
protected override void OnDoubleClick(int rowIndex, int colIndex, MouseEventArgs e)
//base.OnDoubleClick(rowIndex, colIndex, e);

Also please refer the sample modified from our sample browser attached below, which illustrates the mentioned behavior:

Let me know if you have any queries.



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.

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.