The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
JJJisha Joy Syncfusion Team 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(); }