Micro Focus QTP (UFT) Forums

Full Version: Unable to right click column header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Unable to right click on column header.

When click , it records the action on the column header as

Code:
SwfWindow("abc").SwfWindow("pqr").SwfTable("gridControl").SelectColumn "columnName"

but when righjt click on above column header, its not recorded.

Note- This is Devx control.Keyboard event( Right click key) does not get work onht this grid.

by Mouse right click, the Menu get display and records following action in QTP


Code:
SwfWindow("abc").SwfWindow("pqr").SwfTable("gridControl").WinMenu("ContextMenu").Select "<Item 9>"

can any one has workaround for this.

Using following statment, i am able to find the Column header name

Code:
SwfTable(table).GetCellProperty(0,<columnNo>,"colname")
...is this useful ?
It is not useful until you learn to present yourself in a appealing manner. Please include your code inbetween the code tags. That formats it well and is very easy for anyone to understand Smile
Secondly, Is the issue with the right click or that you want the name of the column header?
If there are no methods to right click for the defined object you could use "SendKeys" or "Device Replay". Both these objects have the ability to use the mouse interrupt to click on the respective object provided you specify the co-ordinates.
Research more about the two and you will learn more.
suree basanth, will take care this.

Regarding your solution, i tried with Device replay, but still it does not work. Because, when spy it just showthe object untill Gridview and not its Column Header.
yes, once the co-ordinates get , i can use the Device Replay.
But didnt know how to find the object ( here column header )
There should be a inherent object which specifies the Column Header? Do you think dev team maybe able to help you with respect to the object description?
There is also a dotnetfactory which is an extensibility for .Net Objects. Maybe that may help?
Hi basanth, discussed with Dev, they have used .Columns property to locate the column header.But here QTP doesn support this. Will you pls let us know how to find the co ordinates of the column header ?