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
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://es.infragistics.com/help/winforms-ta-uft/
Hope that will help
Ammar
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??
yep , thats the one
I'm Glad I was able to help
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
Hello Ravi,
I suppose that this question is duplicate with the question from this forum thread https://es.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
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.
Hey Georgi,
Well nopes..i'm still struggling with the issue...u can see my comment posted on the blog mentioned above by you...
Thanks for the info. I`ll write you in the mentioned thread