Micro Focus QTP (UFT) Forums
Obtaining sub-row (or band) information within an Infragistics Grid - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Obtaining sub-row (or band) information within an Infragistics Grid (/Thread-Obtaining-sub-row-or-band-information-within-an-Infragistics-Grid)



Obtaining sub-row (or band) information within an Infragistics Grid - num1g8rfan - 07-09-2013

I am looking for a way to walk through an object's sub-rows (or bands).

In the code below I am able to get a count of the main rows without a problem (RowCount) and can even properly determine which ones are hidden (HiddenRow). The problem comes when I'm trying to identify the sub-rows. I read that I can properly get the sub-row counts by activating the row and then getting the RowCount again, but that's as far as I can get. The Hidden SubRow code below is garbage, so I'm not sure where to go from here. Any assistance possible would be much appreciated!

Here is the code:
Code:
Set Grid = WpfWindow("Intergy EHR").SwfObject("SwfObject").SwfTable("ugTaskDetails")
Grid.ActivateRow(0)    

RowCount = Grid.GetNAProperty("Rows.Count") - 1
msgbox RowCount

For i = 0 to RowCount

    HiddenRow = Grid.object.Rows.Item(i).hidden
    
    If not  HiddenRow Then                     
        Grid.ActivateRow i & ";0"
        WpfWindow("Intergy EHR").SwfObject("SwfObject").SwfTable("ugTaskDetails").RefreshObject

        Set SubGrid = WpfWindow("Intergy EHR").SwfObject("SwfObject").SwfTable("ugTaskDetails")
        SubRowCount = SubGrid.RowCount

        
        
        For j = 0 to SubRowCount - 1

            SubRow = i & ";" &j

            HiddenSubRow = SubGrid.Object.Rows.Item(j).hidden
            msgbox HiddenSubRow
            HiddenSubRows = 0
            If HiddenSubRow Then
                HiddenSubRows = HiddenSubRows + 1
            
            End If
        
        Next
        msgbox HiddenSubRows & " of them are hidden"

    End if    
Next



RE: Obtaining sub-row (or band) information within an Infragistics Grid - Staff - 07-10-2013

Please ensure to include your code between [code] tags while asking or replying to questions. I have done this for you for this time.