Hi,I would like the following functionality in my WinGrid:
When a user clicks in an editable cell for the first time, all text in the cell is selected.If he clicks again in the cell, the selection is removed and the insertion point is where heclicked.
I.e. the same behaviour as in the "URL textbox" in Internet explorer.
I haven't been able to find out how to do this... has anyone else?
RegardsTomas.
Thanks!!
Hi Tomas,
Try something like this:
private void ultraGrid1_AfterEnterEditMode(object sender, EventArgs e) { UltraGrid grid = sender as UltraGrid; if (grid.ActiveCell != null) { EmbeddableEditorBase editor = grid.ActiveCell.EditorResolved; if (editor.SupportsSelectableText) { editor.SelectAll(); } } }