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

Cell edition and selection like Excel

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

5 Replies

AD Administrator Syncfusion Team April 5, 2005 05:34 PM UTC

You set the grid.ActivateCurrentCellBehavior property to control the behavior as you activate a cell.

LM Lars Madsen May 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

AD Administrator Syncfusion Team May 16, 2005 11:11 AM UTC

Try also setting the static property: GridFormulaCellRenderer.ForceEditWhenActivated = false;

LM Lars Madsen May 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)

AD Administrator 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;

Live Chat Icon For mobile
Up arrow icon