Skip to content
Graham
Graham asked on Mar 13, 2013 8:08 AM

Hi,

Is there an easier way of getting a column name other than this example below? Seems a bit long-winded!

SwfWindow(win).SwfTable(grid).Object.DisplayLayout.Bands.Item(0).Columns.Item(0).Key

Or is this the best way because differents bands can have different headings?

Cheers, Ryan

Sign In to post a reply

Replies

  • 0
    Ammar Zuriki
    Ammar Zuriki answered on Jun 25, 2008 2:12 PM

    Hi Ryan,

    you can use the following:

    SwfWindow(win).SwfTable(grid).GetNAProperty("DisplayLayout.Bands[0].Columns[0].Key")

    Actually you can pass in any nested property name as string to GetNAProperty method. you just needs to know the property path you are lokking for. and to help you find out that you can look at the API reference for the controls in the online help at https://www.infragistics.com/help/winforms-ta-uft/

     Hope that will help

    Ammar

    • 0
      Graham
      Graham answered on Jun 25, 2008 2:57 PM

      Hi,

      Thanks for the reply. I've just noticed though…the 'Key' property seems to return different values as compared to what the user sees. Does 'Key' return some sort of programmatic column name, and not the column heading text that is displayed to the user?? If so, what property contains the actual name the user sees??

      Cheers, Ryan

       

      • 0
        Graham
        Graham answered on Jun 25, 2008 3:01 PM

        It's ok I've spotted it. It's in Header.Caption under the columns collection!

      • 0
        Ammar Zuriki
        Ammar Zuriki answered on Jun 25, 2008 3:54 PM

        yep , thats the one

         I'm Glad I was able to help

        Ammar

      • 0
        Ravi Salunkhe
        Ravi Salunkhe answered on Mar 7, 2013 5:45 AM

        Hi Ammar,

        I'm unable to get the column names from the grid, ive tried some of your suggested solutions but the property "GetNAProperty" is not working with QTP 11.

        Please help me out with this as i'm stuck with this issue for a long now.

        Also, how do i retrieve nested grid column names and values?

        Regards,

        Ravi Salunkhe

      • 0
        Georgi
        Georgi answered on Mar 7, 2013 8:51 AM

        Hello Ravi,

        I suppose that this question is duplicate with the question from this forum thread  https://www.infragistics.com/community/forums/f/test-automation-for-micro-focus-uft-windows-forms/25150/accessing-column-names/395472#395472 

        Please take a look there and provide us more details.

        Regards

      • 0
        Georgi
        Georgi answered on Mar 13, 2013 6:59 AM

        Hello Ravi,

        Have you been able to resolve your issue ?  If you still have any concerns or questions I will be glad to help. If you need any additional assistance don’t hesitate to ask.

        Regards

      • 0
        Ravi Salunkhe
        Ravi Salunkhe answered on Mar 13, 2013 7:25 AM

        Hey Georgi,

        Well nopes..i'm still struggling with the issue…u can see my comment posted on the blog mentioned above by you…

        Regards,

        Ravi Salunkhe

      • 0
        Georgi
        Georgi answered on Mar 13, 2013 8:08 AM

        Thanks for the info. I`ll write you in the mentioned thread

        Regards

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Graham
Favorites
0
Replies
9
Created On
Mar 13, 2013
Last Post
13 years ago

Suggested Discussions

Tags

Created by

Created on

Mar 13, 2013 8:08 AM

Last activity on

Feb 18, 2026 11:05 AM