Micro Focus QTP (UFT) Forums
How to get data from an activeX Grid - 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: How to get data from an activeX Grid (/Thread-How-to-get-data-from-an-activeX-Grid)



How to get data from an activeX Grid - amandogra - 01-07-2010

Hi All,

I have a grid which is like this:
Code:
VbWindow("frmMainInterface").VbWindow("frmPersonnelList").ActiveX("ListboxWrapper.lstControl").ActiveX("itGrid6.itGrid")

Could anybody please tell me a way to fetch the data out of this grid. I have tried to 'Object Spy' this grid but this does not tell anything further to 'itGrid6.itGrid'.

Can QTP read the data under this Grid. If yes, then how?


RE: How to get data from an activeX Grid - sreekanth chilam - 01-08-2010

Hi,

Try with below way.

Code:
VbWindow("frmMainInterface").VbWindow("frmPersonnelList").ActiveX("ListboxWrapper.lstControl").ActiveX("itGrid6.itGrid").Object.DoClick
Actx_Data=VbWindow("frmMainInterface").VbWindow("frmPersonnelList").ActiveX("ListboxWrapper.lstControl").ActiveX("itGrid6.itGrid").Object.Text
msgbox Actx_Data



RE: How to get data from an activeX Grid - amandogra - 01-08-2010

Thanks for the response Sreeakanth but the following didn't work. First, the doClick event was not recognized, so i replaced it with Click. but when I ran the script after that it just displayed me 20 11. I have about 22 rows in this grid having about 24 columns with data in most of them. QTP is considering whole of the grid as a single entity.

anyways thatnsk for your help. If you have any other idea then I would really appreciate that
Aman