Micro Focus QTP (UFT) Forums
FlexDataGrid - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: FlexDataGrid (/Thread-FlexDataGrid)



FlexDataGrid - pranjal - 08-21-2009

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.


RE: FlexDataGrid - basanth27 - 08-21-2009

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.



RE: FlexDataGrid - pranjal - 08-21-2009

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.


RE: FlexDataGrid - pranjal - 08-27-2009

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.


RE: FlexDataGrid - basanth27 - 08-27-2009

Pranjal -

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