Smithy1001
Programmer
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
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