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

GridComboBoxRenderer double click

Hi,

we have a derived grid combo box cell (which is editable). Now when I make a double click in the cell I want the current value to be highlighted. The current behavior is that the value in the cell changes to the next value of the listbox. So how can I hightlight the cell value with a double click instead of switching to the next item of the listbox.

Cheers,
Al

PS: I have attached a sample where you can see the behavior

DropDownBox_Select.zip

1 Reply

HA haneefm Syncfusion Team April 30, 2007 03:51 PM UTC

Hi Al,

You turn off selecting the next index when user double clicks inside the cell by setting the AllowDoubleClickChangeSelectedIndex property to false. Here is a code snippet

public class MyComboBoxCellModel : GridComboBoxCellModel
{
public MyComboBoxCellModel(GridModel grid): base(grid)
{ this.AllowDoubleClickChangeSelectedIndex = false;
}
public override GridCellRendererBase CreateRenderer(GridControlBase control)
{
return new MyComboBoxCellRenderer(control, this);
}
}

Sample: DropDownBox_Select.zip

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon