Category / Section
How to select all the text on clicking the cell in WinForms GridControl?
1 min read
Selection
In GridControl, the current cells behavior is controlled by the grid’s ActivateCurrentCellBehavior property. When the property is set to SelectAll, it selects all the text in the cell when the cell becomes the current cell.
C#
//set to select all the text in the current cell this.gridControl1.ActivateCurrentCellBehavior = Syncfusion.Windows.Forms.Grid.GridCellActivateAction.SelectAll;
VB
'set to select all the text in the current cell Me.gridControl1.ActivateCurrentCellBehavior = Syncfusion.Windows.Forms.Grid.GridCellActivateAction.SelectAll
After applying the properties, the grid is shown as follows,
Figure 1: Selects all the text in the cell
Samples:
C#: SelectAll Text
VB: SelectAll Text