Skip to content

Infragistics Community Forum / Test Automation For Micro Focus Uft Windows Forms / How to get the visible data from a particular cell in SwfTable object

How to get the visible data from a particular cell in SwfTable object

New Discussion
Lakshmi
Lakshmi asked on Jul 16, 2009 1:05 PM

Hi

When I was using GetCellData method, iam retrieving the data like “1617.0792315” from a cell.

But the displayed(visible) value is rounded to 2 decimals and showing as “1617.08”. To do some validations at any cost i need to retrieve only the visible value from all cells in a table.

To achieve this, which method i supposed to use in QTP?

Any help is highly appreciated.

Regards

Lakshmi

Sign In to post a reply

Replies

  • 0
    Alan Halama
    Alan Halama answered on Jun 8, 2009 7:35 PM

    Lakshmi,

    You can use either the GetCellProperty or GetNAProperty methods to get the Text of the cell.  For example, both of the following could be used:

    msgbox SwfWindow("WinEditors Within WinGrid").SwfTable("ultraGrid1").GetCellProperty("1","0;Item","Text")

    msgbox SwfWindow("WinEditors Within WinGrid").SwfTable("ultraGrid1").GetCellProperty("1","0;Item","Text")

    Note that the second parameter for GetCellProperty is the column and requires the band before the column, this is why "0;" is passed in as part of the column string.

    For GetNAProperty, you may want the to read my post on Where to get a list of all properties I can view using GetNAProperty?

    Let me know if you have any questions with this matter

    Alan

    • 0
      Lakshmi
      Lakshmi answered on Jun 8, 2009 7:49 PM

      Hi Alan

      GetCellProperty is working as per my requirement. Before posting the query I tried with GetCellProperty("1","0;Item","Value"). But it is also getting the complete hidden value. that's why posted.

      Thanks alot for the help.

      Regards

      Lakshmi

      • 0
        Abdul
        Abdul answered on Jul 16, 2009 1:05 PM

        Use dotnet spy and try to find where the required data is stored and script it like

        For k= 0 to …….SwfTable("ultraGrid1").Object.Datasource.Column.count-1

        If …….SwfTable("ultraGrid1").Object.Datasource.Column.Item(k).ColumnName="0;Item' Then

         ColumnIndex=k

        End If

        obj=…….SwfTable("ultraGrid1").Object.Datasource.Row(RowNo).Array

        required text=obj(ColumnIndex)

         

         

        Let me know if it doesnot work.

        Fawaz

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Lakshmi
Favorites
0
Replies
3
Created On
Jul 16, 2009
Last Post
17 years, 2 months ago

Suggested Discussions

Created by

Created on

Jul 16, 2009 1:05 PM

Last activity on

Feb 20, 2026 12:24 PM