Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FlexDataGrid rows
#1
Not Solved
Hi,
I have a FlexDataGrid which has 20 rows. Only 17 are visible without scrolling.
I get the number of rows in a FlexDataGrid using .GetROProperty("rowcount")
But this only gives me the number of rows that are visible on the screen without scrolling.
How can I get all the rows in the grid?
Please let me know.
Thank you.
Reply
#2
Not Solved
Hi,
Instead of using the getRoProperty can you please use the childobjects and try to obtain number of childobjects in the grid?
Code:
Set DescObj=Descp.Create()
DescObj("micclass").value="your flexdatagrid property here"
Set totalrows=Browser(x).Page(x).childObjects(DescObj)
msgbox totalrows.count
Could you please provide the hierarchy so we can implement the code exactly.
Thanks,
Malini

Thanks,
Malini
Reply
#3
Not Solved
Hi Pranjal,
it will help, If you can specify exactly what you would like to access rows of datagrid.
You can try .SelectIndex(i) to select the row. this should work for rows that are not visible.
And .getROProperty("selectedItem") should get you the item.

Reply
#4
Not Solved
Saket, I only need the total number of rows, not the content.
There are 20 rows out of which 1-17 are visible on first load and the FlexDataGrid can be scrolled to the bottom to see 4-20.
The problem is "rowcount" property gives me only 17 instead of 20.

I will try Malini's suggestion and let you know if that worked. Thanks a lot!
Reply
#5
Not Solved
I did not get the expected result even after using numautomationchildren. I also tried recording the scroll and getting the number of rows. But it still gives me less number of rows than there are actually in the grid. Here is the code:

Code:
with Browser("browser").FlexApplication("portal").FlexContainer("container").FlexBox("box").FlexBox("innerbox").FlexDataGrid("grid")

Dim rows, totalrows
rows = .GetROProperty("rowcount")
totalrows = .GetROProperty("NumAutomationChildren")

.Scroll 16,flexScrollVertical,flexThumbPosition
rows = .GetROProperty("rowcount")
totalrows = .GetROProperty("NumAutomationChildren")

End With
Reply
#6
Not Solved
Hi Pranjal,
QTP has the automatic scrolling actually.
Could you please try to obtain the total number of objects in the table by extracting the childobjects..

Thanks,
Malini
Reply
#7
Not Solved
@Everyone - Please wrap up your code using tags to make it more readable. read this to enhance your posts.

Reply
#8
Not Solved
Is this Supported ?
Code:
.FlexDataGrid().Object.Rows.Count ?
What does this retrieve ? If this does not help see if the DOM method helps you.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple rows of test data Bhuvana 0 1,337 01-03-2020, 09:30 PM
Last Post: Bhuvana
  Adding data into rows that add dynamically with setcelldata azar81 4 5,916 04-13-2015, 05:24 PM
Last Post: vidya2k2
  Excel operation - to find usedrange of rows & col pooja 1 9,706 02-19-2015, 04:06 AM
Last Post: supputuri
  how to count rows and columns in csv file. venkatesh9032 1 2,797 02-18-2014, 01:28 AM
Last Post: supputuri
  UFT 11.52 - How to select multiple rows in webtable UFT_Tester 0 6,233 09-12-2013, 09:36 PM
Last Post: UFT_Tester

Forum Jump:


Users browsing this thread: 1 Guest(s)