Micro Focus QTP (UFT) Forums

Full Version: FlexDataGrid
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,
I am trying to record and get data from a FlexDataGrid on an application.
The grid contains rows and columns, with each row being a FlexBox.
Inside the flexBox, each cell of the row has either flexlabel or flexbutton.
My goal is to get the text on these lables and buttons.

How can I get to this text? this is the grid.
Code:
Browser("Page").FlexApplication("App").FlexContainer("index:52").FlexBox("box1").FlexBox("box2").FlexDataGrid("grid").

how can I iterate through this datagrid and get cell data?
it does not have a property GetCellData.

any suggestions will be appreciated. This is urgent.
thank you.
does the below answer your question ?

Code:
oChild = Browser("Page").FlexApplication("App").FlexContainer("index:52").FlexBox("box1").FlexBox("box2").FlexDataGrid("grid").ChildObjects
rowcount = Browser("Page").FlexApplication("App").FlexContainer("index:52").FlexBox("box1").FlexBox("box2").FlexDataGrid("grid").GetRoProperty("Rowcount")
colcount = Browser("Page").FlexApplication("App").FlexContainer("index:52").FlexBox("box1").FlexBox("box2").FlexDataGrid("grid").GetRoProperty("ColumnCount")

For i = 1 to rowcount
oCellValue = oChild(i).GetRoProperty("AutomationName")
Next

Hope this helps.
Hi,
thanks for the suggestion. I tried it. I am able to get the entire row as a single pipe delimited string now. All I have to do it parse it.
another way to do this is:
.SelectIndex(i)
.getROProperty("selecteditem")
thank you.
Hi,
I am trying to do the same with FlexRepeater. Do you know what property I should use to get number of rows ? RowCount doesnt work.
thanks.
Pranjal -

Please OPEN a NEW post for every NEW question you have.