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.
Syncfusion Feedback

ComboBox Cell Dropdown

Thread ID:

Created:

Updated:

Platform:

Replies:

96555 Sep 20,2010 01:32 PM UTC Sep 23,2010 09:52 AM UTC Windows Forms 1
loading
Tags: GridControl
Qingde Shi
Asked On September 20, 2010 01:32 PM UTC

Hi,

I am using ComboBox in virtual mode with the following settings:
e.Style.DropDownStyle = GridDropDownStyle.Exclusive;
e.Style.ShowButtons = GridShowButtons.ShowCurrentCell;

Currently, when clicking the ComboBox cell, the dropdown displays automatically. My question is how to make the grid behaves like this: When first time click the cell, the button shows, but not the dropdown, only on a second click, the dropdown appears.

and similar question is for textbox cell, how to make the cell editable only on second click?

Thanks,

Q


Jisha Joy [Syncfusion]
Replied On September 23, 2010 09:52 AM UTC

Hi,

You can get this behavior by handling the CellDoubleClick event of the grid, in which try calling the ShowDropDown() method of the currentcell, if its of combobox celltype. Also, set the DropDownStyle to AutoComplete and the ActivateCurrentCellBehavior property of the grid to DblClickOnCell. Please see the code snippets below:
// CurrentCellActivated event of the grid
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if (cc.Renderer.StyleInfo.CellType == "ComboBox")
{
this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell;
}
else
{
this.gridDataBoundGrid1.ActivateCurrentCellBehavior = GridCellActivateAction.ClickOnCell;
}

// CellDoubleClick event of the grid
GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell;
if (cc.Renderer.StyleInfo.CellType == "ComboBox")
{
cc.ShowDropDown();
}

Regards,
Jisha


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

;