tags:

views:

166

answers:

2

Hello,

I have a simple DBGrid, DBNavigator, and an 'Edit' Button which simply calls

DBNavigator.BtnClick(nbEdit);

When the user clicks 'Edit', I want the text in the selected cell (just the text - not the whole cell) to be highlighted - as if ready to be overwritten; whereas when I do

DBGid.SetFocus; 
DBNavigator.BtnClick(nbEdit);

the whole cell is highlighted.

How can I select the entire text of a selected cell?

+2  A: 

Set 'Options - dgAlwaysShowEditor' to true.

Edelcom
Yep, that achieves the objective. Thanks.
Sam
Can you please select my answer than (clicking the number in front of the anwswer). Thx
Edelcom
+1  A: 
DBGrid.SelectedField.FocusControl;
Sam