Micro Focus QTP (UFT) Forums

Full Version: JTableHeader
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everybody,

I've got a little problem with a JTableHeader.
I try to find the index of column. The column name (in the header) is "C1" (for example).

I'm using :
Code:
JavaWindow("window_Test").JavaObject("JTableHeader").Object.getColumnIndex("C1")

It works fine if the column exists. The trouble is that the column may have a different name : "C1 >>" or "C1 <<"

In that case QTP launch an exception :
"This object doesn't manage this method or property" (something like that)
And it stopped the programm.

I didn't succeed in finding a way to solve this problem.

[/align]
Thanks in advance for your help !
Ok I found one way.

I use the JTable associated to the JHeader :
table.GetColumnName(i)