Hi Lane,
You can test the ComponentOne True DBGrid control by using a set of its native properties, fields and methods that are exposed by TestComplete and available in tests. It seems that you have already used one of such properties,
Row, in your scripts. There is also the
SelBookmarks native property that provides access to a collection of currently selected grid rows. The object returned by this property contains the
Add method. By passing a row index to this method, you can add a new item to the collection, and the appropriate row then becomes selected in the grid. Note that the collection can contain several items at the same time if multiselection is enabled for the grid. Then, each newly added item will cause the selection of the appropriate row in the grid and the previously selected rows will still remain selected. In this case, if you need only one row to be selected in the grid, you should also call the
SelBookmarks.Clear() method before adding a new item to the collection. This method clears the previous selection in the grid. For example:
Dim bookmarks
Set bookmarks = grdMyGrid.SelBookmarks
' Clear the previous selection
bookmarks.Clear
' Select the row with the index equal to 5
bookmarks.Add(5)
However, note that this approach selects grid rows programmatically. That is, the specified row becomes selected with no mouse clicks actually performed over the appropriate row selector during the test execution. Does this approach match what you need?
BTW, TestComplete currently records only coordinate mouse clicks with the True DBGrid control because there are no special methods and properties provided by TestComplete for this component. However, if you are really interested in implementing a special support for the ComponentOne True DBGrid control in TestComplete, you can vote for this feature in the
TestComplete Feature Survey. Perhaps, such support will be implemented in one of future releases of TestComplete if a lot of users will be interested in it.