Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetFocus to a particular grid column

Status
Not open for further replies.

cpmasesa

Programmer
Oct 24, 2002
78
AE
Hello,

1. how can i have focus set to the 3rd (or any other) column in a dbgrid?

2. How do i achieve autocomplete (ie typing moves to record nearest matching typed string) on the embedded tcombobox that is created in a dbgrid if the underlying field is a lookup field

TIA

Clemens
 
1.
Code:
DBGrid1.SelectedIndex := 4;

2. This is not easy as this control is well-hidden inside DBGrids.pas. Have you looked at the third-party DBGrids out there? They have this feature.

Cheers
 
Richard

1. Thanks

2.I need a freeware/shareware dbgrid component that does what i asked. any suggestions

Clemens
 
Hi there.

You can also focus a DBGrid column by the field name.

DBGrid1.SelectedField := Table1.FieldByName('Field Name');

As for question#2. I have used the Infopower package, it has a great DBGrid and great embedded controls that I even use without the DBGrid. Try the trial at
For freeware you can search or
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top