Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
310
Obtaining Rowcounts under a collapsable row
posted

Hi,

I need a nice way of getting the row count with regards to the grid I have. The grid in question has 5 rows that are collapsable/expandable, and when expanded, show more 'child' rows under each of them. I need to determine the amount of rows that exist under each of the collapsable rows.

Currently when I write ...SwfTable("grid").GetNAProperty("Rows.Count"), the value returned is '5' which seems to be the number of those collapsable rows

When I do SwfTable("grid").RowCount I get a figure that represents the total amount of rows under whatever of the 5 collapsable rows I am currently highlighted in. E.g. my second collapsable row has 19 rows underneath it, so when I highlight any one of those 19 rows then I run those two pieces of code, the results returned are '5' & '19'. Now this is good as it seems that this provides a way to determine what I want. However I would like to be able to do it in a more tidy fashion. For example, I could get ("rows.count") property and then loop through them and then determine the amount of child rows under them.

Something of the form:

 For i = 0 to ...swftable("grid").GetNAProperty("Rows.Count") - 1
 ...swfTable("grid").Rows(i).RowCount
Next

It's the line of code in the loop statement that I am struggling to get right. The syntax in that example is wrong and I need help in determining the correct syntax in referring to a 'child' row as a property of the collapsable parent row.

Thanks for your help!

Ryan