)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to find whether a row in the GridGroupingControl is expanded or collapsed through test script code?

Platform: WinForms |
Control: QTP Add-On |
Published Date: April 30, 2011 |
Last Revised Date: July 10, 2014

 

The helper functions such as IsGroupExpanded, IsRecordExpanded will be helpful in knowing these status. The other related functions are IsGroupRow and IsRecord, helps to find whether a row is a record row or a caption row.

VB

 

SwfWindow("GridGroupingControl").Move 405,287

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 4,"parentID"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").ExpandRecord 4

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 10,"childID"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").ExpandRecord 10

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").MouseDown 6,"Name","Left"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 10,"childID"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").GroupBy "ChildTable","Name","Add"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").ExpandGroup 9

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 11,"childID"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 13,"childID"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").ExpandGroup 8

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 8,"childID"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCurrentCell 10,"Name"

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetScrollPosition 80,18

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetScrollPosition 84,18

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetScrollPosition 84,18

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetScrollPosition 85,18

SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").SetCellData 10,"Name","ChildName0_Modified"

If SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").IsGroupRow(8) Then

 If SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").IsGroupExpanded(8) Then

  MsgBox "Row 8 is found to be a Caption and is expanded"

 Else

    MsgBox "Row 8 is found to be a Caption and is Collapsed"

End If

End If

If SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").IsRecord(10) Then

 If SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").IsRecordExpanded(10) Then

  MsgBox "Row 10 is found to be a Record and is expanded"

 Else

    MsgBox "Row 10 is found to be a Record and is Collapsed"

End If

End If

 SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").CollapseGroup 5

If SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").IsGroupRow(5) Then

 If SwfWindow("GridGroupingControl").SwfObject("gridGroupingControl1").IsGroupExpanded(5) Then

  MsgBox "Row 5 is found to be a Caption and is expanded"

 Else

    MsgBox "Row 5 is found to be a Caption and is Collapsed"

 End If

End If

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon