Working With Microsoft DataGrid

Applies to TestComplete 14.93, last modified on October 12, 2021

TestComplete has the Microsoft Control Support plugin that expands TestComplete abilities to interact with Microsoft DataGrid .NET controls from scripts. If this plugin is installed and enabled, TestComplete extends the DataGrid control functionality with methods, properties and actions of the MicrosoftDataGrid object. These supplementary members let you perform specific operations over the DataGrid control, for example, simulate clicks on grid cells, obtains and set values in grid cells, click column headers and so on.

Since the DataGrid .NET control can be used within .NET applications, which are always “open” to TestComplete, the internal methods and properties of the DataGrid control are also visible to TestComplete. This “openness” means that you can use the DataGrid’s “native” methods and properties to perform the needed actions as well.

Finally, you can work with the DataGrid control as a black-box application window, that is, you can simulate various mouse actions and keystrokes, record and play back low-level procedures, and so on. For more information, see Simulating User Actions.

In order for TestComplete to have access to internal methods and properties of the DataGrid control and to extend the DataGrid control functionality, both the .NET Application Support and Microsoft Control Support plugins must be installed and enabled.

The topics of this section provide detailed information about performing various operations with the DataGrid control. They also contain numerous sample routines that you can use in your scripts with minimum changes (if any). Note, that these topics are devoted to DataGrid controls. For information on working with DataGridView controls, see the Working With Microsoft DataGridView section.

In This Section

Searching for Records in Microsoft DataGrid

Describes how to search for a specific record within the DataGrid control.

Selecting Cells in Microsoft DataGrid

Describes the approaches used to select individual grid cells.

Getting the Focused Row, Column and Cell in Microsoft DataGrid

Explains how to determine the row, column and cell that is currently focused.

Obtaining and Setting Cell Values in Microsoft DataGrid

Describes how you can get and set values in individual grid cells.

Copying and Pasting Cell Values in Microsoft DataGrid

Describes how you can copy or paste the cell value.

Selecting Multiple Rows in Microsoft DataGrid

Describes how you can select several rows, columns and cells within the DataGrid control.

Obtaining Selected Records in Microsoft DataGrid

Explains how to obtain the records selected in the DataGrid control.

Iterating Through Rows in Microsoft DataGrid

Describes how to process the grid rows data in a loop.

Sorting Data in Microsoft DataGrid

Explains how you can sort data displayed in the DataGrid control.

Related Topics of Interest

Table Checkpoints

Explains how to create checkpoints that verify data displayed in tabular controls.

See Also

Microsoft DataGrid Support
Working With Grids
Supported Microsoft Controls
Testing .NET Applications

Highlight search results