07-09-2013, 06:41 PM
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:
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