Micro Focus QTP (UFT) Forums
JTableHeader - 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: JTableHeader (/Thread-JTableHeader)



JTableHeader - SAKDOSS - 08-03-2009

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 !


RE: JTableHeader - SAKDOSS - 08-03-2009

Ok I found one way.

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