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.
By default, by clicking on a cell, we select it and enter the edit mode.
I would like to disable this behavior : on a click I want to select the cell and I want to enter the edit mode on the double click.
What is the best way to do this?
Thanks in advance,
Sebastien
ADAdministrator Syncfusion Team April 5, 2005 05:34 PM UTC
You set the grid.ActivateCurrentCellBehavior property to control the behavior as you activate a cell.
LMLars MadsenMay 16, 2005 10:01 AM UTC
In the sample FormulaCellSelection, provided by you,
ActivateCurrentCellBehavior seems only to apply to the cells in the grid that are not of type "FormulaCell", the FormulaCell cells always
go into edit mode when clicked on (not when using the keyboard), and even if you set
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell;
this does not change anything
ADAdministrator Syncfusion Team May 16, 2005 11:11 AM UTC
Try also setting the static property:
GridFormulaCellRenderer.ForceEditWhenActivated = false;
LMLars MadsenMay 16, 2005 11:44 AM UTC
Thanks, that worked well
On a related note, is there a way to not have to press enter twice when entering a formula like =5*A3
where you have used the keyboard to navigate to A3?
(i.e once to unselect A3 and once to calculate)
(If you look at Excel, you can see that it sets the cursor at the end of the text and only requires one enter press)
ADAdministrator Syncfusion Team May 16, 2005 12:41 PM UTC
There are no property settings to manage this.
You can try commenting out the code in teh keys.Enter case in the controller class in grid_CurrentCellKeyDown:
case Keys.Enter:
// if(inKeyMove)
// {
// inKeyMove = false;
// e.Handled = true;
// PlaceTextInCell(ResetSelectionAfterPlacement);
// CancelMode();
// return;
// }
break;