How to read a cell in the GridControl by using WinForms QTP?
You can retrieve the text from the cell by using the GetCellData method or GetFormattedText method by using WinForms QTP.
Using GetCellData Method
The GetCurrentCell method retrieves the text of the given cell. The following code example retrieves the value of the cell [1,1] in the Grid.
value = SwfWindow("Form1").SwfObject("gridControl1").GetCellData(1,1)
msgbox value
This method retrieves the formatted text of the cell. In the following code example, the formatted text is retrieved of the cell [2,1].
value = SwfWindow("Form1").SwfObject("gridControl1").GetFormattedText(2,1)
msgbox value
I hope you enjoyed learning about how to read a
call in the GridControl by using QTP.
You can refer to our WinForms
QTP feature tour page to know about its other groundbreaking feature
representations. You can also explore our WinForms QTP documentation to understand
how to present and manipulate data.
For current customers, you can check out our
components from the License and
Downloads page. If you are new to Syncfusion, you can try
our 30-day free trial to
check out our other components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!