TestComplete samples (both built-in and additional) are located in the <Users>\Public\Public Documents\TestComplete 14 Samples folder.
Some file managers display the Public Documents folder as Documents.
If you have the Desktop module of TestComplete, you can interact with DevExpress XtraGrid controls from tests. TestComplete provides the DevExpressXtraGrid
object that you can use to simulate various user actions over the XtraGrid control, for example, clicking grid cells, getting and setting values in cells, expanding and collapsing rows, and so on.
Because XtraGrid is a .Net control and is used in .NET applications that are always open for TestComplete, the internal methods and properties of the control are also available from tests. You can use these properties and methods to simulate user actions, as well.
Finally, you can work with the XtraGrid 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 XtraGrid control and to extend the XtraGrid control functionality, both the .NET Application Support and Developer Express Control Support plugins must be installed and enabled. |
This section describes how to perform the most common operations over the XtraGrid control. It also provides several sample routines you can use in your scripts with minimum changes. These routines work with the sample applications that come with the DevExpress trial package (to learn how to get the sample applications, see the respective topics).
In This Section
Accessing Views in Developer Express XtraGrid
Searching for Records in Developer Express XtraGrid
Selecting Cells in Developer Express XtraGrid
Getting the Focused Row, Column and Cell in Developer Express XtraGrid
Activating and Closing In-place Editors in Developer Express XtraGrid
Obtaining and Setting Cell Values in Developer Express XtraGrid
Working With Specific In-place Editors in Developer Express XtraGrid
Copying and Pasting Cell Values in Developer Express XtraGrid
Selecting Multiple Rows and Cards in Developer Express XtraGrid
Obtaining Selected Records in Developer Express XtraGrid
Iterating Through Rows and Cards in Developer Express XtraGrid
Sorting Data in Developer Express XtraGrid
Expanding and Collapsing Rows in Developer Express XtraGrid
Related Topics of Interest
Samples
TestComplete includes a sample project that demonstrates how you can work with Developer Express XtraGrid controls from scripts:
<TestComplete Samples>\Desktop\Working With Grids\DevExpress XtraGrid
Note: | If you do not have the sample, download the TestComplete Samples installation package from the support.smartbear.com/downloads/testcomplete/samples/ page of our website and run it. |
The script requires a sample application that is part of the DevExpress trial package available at devexpress.com/products/try/.
The script assumes that the application under test has the following path:
<Users>\Public\Public Documents\DevExpress Demos NN.N\Components\WinForms\XtraGrid\Bin\GridMainDemo.exe
Before running the script, make sure that the GridMainDemo item of the Tested Applications project item stores a valid link to the tested application.
See Also
Developer Express XtraGrid Support
Working With Grids
Supported Developer Express Controls
Testing .NET Applications