Working With Grids

Applies to TestComplete 14.71, last modified on April 22, 2021

TestComplete provides support for the most popular grid controls, including Microsoft DataGridView, Developer Express XtraGrid, Infragistics UltraGrid and others (for a full list, see Supported Controls). It automatically associates supported grid controls with program objects that provide testing functionality for the grid control with a number of properties and methods. You use those properties and methods to perform various testing operations over grid controls. For example, simulate mouse clicks on grid cells, get and set cell values, and so on.

As for any other grid controls, you can work with them in one of the following ways:

  • If TestComplete can access your grid control’s native properties and methods, you can use them in your tests. For instance, to get the value of a grid cell, your script code can use the grid’s internal method. For the list of applications whose internal properties and methods TestComplete can access, see About Open Applications.

  • If TestComplete cannot access your grid control’s native properties or methods:

    • You can simulate user actions over the grid control by using the Click, DblClick, Keys, and other methods that TestComplete provides for all visual objects. You can also use low-level procedures to simulate mouse and keyboard events over the grid control.

    • You can use optical character recognition to simulate user actions over blocks of text that your grid control renders on the screen. For example, you can simulate mouse actions over the header caption’s text. In the same way, by using optical character recognition, you can capture and verify all the content that your grid control displays.

This section describes how to work with various Windows grid controls (examples are included). To learn how to work with Android grid view controls, see Working With Android Grid View Controls.

In This Section

Working With Grids - Basic Concepts

Contains information about the support provided by TestComplete for grid controls.

Common Operations for Grids

Describes approaches that can be used to perform various operations over grid controls.

Working With Borland TDBGrid

Explains how you can work with Borland TDBGrid controls.

Working With Developer Express QuantumGrid

Describes how to work with Developer Express QuantumGrid controls.

Working With Developer Express XtraGrid

Describes how to work with Developer Express XtraGrid controls.

Working With Infragistics UltraGrid

Describes how to work with Infragistics UltraGrid controls.

Working With Infragistics UltraWebGrid

Describes how to work with Infragistics UltraWebGrid controls.

Working With Java Swing JTable

Describes how to work with Java Swing JTable controls.

Working With Microsoft DataGrid

Explains how to work with Microsoft DataGrid .NET controls.

Working With Microsoft DataGridView

Describes how to work with Microsoft DataGridView controls.

Working With Microsoft PropertyGrid

Explains how you can work with Microsoft PropertyGrid controls.

Working With Syncfusion GridControl

Describes how to work with the GridControl controls of the Syncfusion Essential Grid library.

Working With Syncfusion GridDataBoundGrid

Explains how you can work with the GridDataBoundGrid controls of the Syncfusion Essential Grid library.

Working With Syncfusion GridGroupingControl

Describes how you can work with the GridGroupingControl controls of the Syncfusion Essential Grid library.

Related Topics of Interest

Table Checkpoints

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

Samples

TestComplete includes a number of sample projects that demonstrate how to work with various grid controls:

Borland TDBGrid:

<TestComplete Samples>\Desktop\Working With Grids\Borland TDBGrid

Borland StringGrid:

<TestComplete Samples>\Desktop\Working With Grids\Borland TStringGrid

Developer Express PropertyGrid:

<TestComplete Samples>\Desktop\Working With Grids\DevExpress PropertyGrid

Developer Express VerticalGrid:

<TestComplete Samples>\Desktop\Working With Grids\DevExpress VerticalGrid

Developer Express WPFGrid:

<TestComplete Samples>\Desktop\Working With Grids\DevExpress WPFGrid

Developer Express XtraGrid:

<TestComplete Samples>\Desktop\Working With Grids\DevExpress XtraGrid

Developer Express XtraVerticalGrid:

<TestComplete Samples>\Desktop\Working With Grids\DevExpress XtraVerticalGrid

Infragistics UltraGrid:

<TestComplete Samples>\Desktop\Working With Grids\Infragistics WinGrid

Infragistics XamDataGrid:

<TestComplete Samples>\Desktop\Working With Grids\Infragistics XamDataGrid

Swing JTable:

<TestComplete Samples>\Desktop\Working With Grids\JTable

Microsoft DataGridView:

<TestComplete Samples>\Desktop\Working With Grids\Microsoft DataGridView

Microsoft PropertyGrid:

<TestComplete Samples>\Desktop\Working With Grids\Microsoft PropertyGrid

QtTableWidget:

<TestComplete Samples>\Desktop\Working With Grids\QtTableWidget

Telerik RadGridView:

<TestComplete Samples>\Desktop\Working With Grids\Telerik RadGridView

TMS TAdvStringGrid:

<TestComplete Samples>\Desktop\Working With Grids\TMS TAdvStringGrid

Xceed GridControl:

<TestComplete Samples>\Desktop\Working With Grids\Xceed DotNetGrid

You can download more grid samples from https://support.smartbear.com/downloads/testcomplete/samples. The names of the sample scripts coincide with the names of the grid controls they test:

ComponentOne True DBGrid Pro

ComponentOne VSFlexGrid Pro

Janus GridEX

Janus GridEX v3

See Also

Object-Specific Tasks
Simulating User Actions
Supported Controls

Highlight search results