Recognize GridTableControl when spying the GridGroupingControl in QTP.
In the Object Spy, the Syncfusion.Windows.Forms.Grid.Grouping.GridTableControl is shown
at the last node and the Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl is also
shown ahead of it. Grid Grouping contains the GridControl named the GridTableControl. So,
the GridTableControl is exposed, that is, a part of
the GridGroupingControl. All the necessary functions
that interact with the GridGroupingControl are provided
in the GridGroupingControl custom server
(GridGroupingControl.dll).
SwfWindow("GridGroupingControl").Activate
'Sets the Current Cell.
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 4,"parentID"
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 5,"parentID"
'Expands Record 5.
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").ExpandRecord 5
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 10,"childID"
'Expands Record 10.
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").ExpandRecord 10
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 14,"grandChildID"
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 14,"Name"
'Sets the value for the cell.
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCellData 14,"Name","New Name"
SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 15,"Name"
'Gets the cell value.
a = SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").GetCellData( 14, "Name")
MsgBox aI hope you enjoyed learning about recognizing GridTableControl when spying the GridGroupingControl in 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!