TestComplete Tip: (Using the Mouse to Select Rows in DataGridView)
Sometimes there are events attached to certain functions of a DataGridView. These events will not be triggered by programmatically selecting the row.
Grid.Rows.Item(Row).Selected = true;
So what can you do about this? The .NET 2.0 framework includes a very useful property off of most controls called ‘AccessibilityObject’, the property object contains the screen location for the control. Since TestComplete contains a method to convert screen coordinates to the control coordinates, it is now easy to make the mouse click and select the rows in the DataGridView and trigger all the normal events.