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 : Nov 16th 2018).
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?

 

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

Article ID: Published Date: Last Revised Date: Platform: Control:
1848 04/30/2011 07/10/2014 WinForms QTP Add-On
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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