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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

highlight dbgrid in D2010

Status
Not open for further replies.

Smithy1001

Programmer
Jun 9, 2006
8
0
0
GB
Hi,

I have a text box that the user can type in a number and then presses a button. I also have a dbgrid with a list of number in. I can look through the dataset and find the number. I can even select that row. I cannot get that row highlighted or simulate an on click event on that row. Here is my current code. How do I get the row highlighted please?

dbg_PN.SelectedRows.CurrentRowSelected := true; //row is selected but not highlighted
dbg_PN.DataSource.DataSet.GotoBookmark(Pointer(dbg_PN.SelectedRows.Items[0])); //doesn't seem to do anything (taken from about.com)

My list os only one column wide.

Thanks

Paul
 
Hi Imex,

Yes that did the trick, it is selected now.

Many thanks

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top