Highlighting a row does not select the row. In order for the row to be selected, it must be added to the SelectedRowCollection. This can be done using the Add method.
Add the following code to the Click event of the Select button:
Me.C1TrueDBGrid1.SelectedRows.Add(Me.C1TrueDBGrid1.Bookmark)
· C#
this.c1TrueDBGrid1.SelectedRows.Add(this.c1TrueDBGrid1.Bookmark);
· Delphi
Self.C1TrueDBGrid1.SelectedRows.Add(Self.C1TrueDBGrid1.Bookmark);
This topic illustrates the following:
Using this example, the current row is selected.
See Tutorial 5 - Selecting Multiple Rows Using Bookmarks for an example of the Add method being used.
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |