How to Select All Text in a Grid After Clicking a Cell

15 Jun 20211 minute to read

Introduction

ActivateCurrentCellBehavior property controls the activation behavior as a cell becomes current by being clicked or through the cursor keys. If you want the cell text to be fully selected when a cell becomes the current cell, then use the following property.

The following code illustrates how to set Cell Activation behavior to SelectAll in GridControl:

//Sets Cell Activation behavior to 'SelectAll'.
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;
'Sets Cell Activation behavior to 'SelectAll'.
Me.Grid.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll

The following code illustrates how to set Cell Activation behavior to SelectAll in GridGrouping control:

this.gridGroupingControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SelectAll;

NOTE

Other options range from None (no activation at all) to ClickOnCell, DblClickOnCell or SetCurrent.