Hi,
I am having problem getting x, y coordinates for a cell in UltraWinGrid. I need these to perform Drag and Drop operation between two grids.
If anyone has come across this type of problem please help me out
Thanks,
Srini
Due to a limitations inherent in QTP control identifications, we don't directly support the interactions with custom cell editors, even those as simple as a button. That being said, knowing this would be a limitation, we have added work-arounds to this limitation in the form of SubItem based actions. We have been adding to them from release to release. But from the earliest release there should be the an action ClickSubItem. With this you can do something like:SET grid = WpfWindow("Window1").XamDataGrid("xdg1")grid.ClickSubItem gridCell, "{1}[0]"
By default that will click in the center of the cell. If you have several buttons in a cell and you know roughly how wide they are you might want to do something like:SET grid = WpfWindow("Window1").XamDataGrid("xdg1")grid.ClickSubItem gridCell, "{1}[0]", igMidLeft, 10grid.ClickSubItem gridCell, "{1}[0]", igMidLeft, 50
The latter two actions would click 10 pixels and then 50 pixels in from from the middle of the left side.For later versions we add GetSubItemProperty\SetSubItemProperty which work like GetNAProperty but for the SubItems, as well as adding custom properties not inherent in the control to allow for simple navigation through the UIElement trees. Which will allow you to directly set values for complex multi control custom editors. There are articles in the installed help for each version that go in greater depth for each of these actions.
I need to click a button/image which is there in xamdatagrid cell. What I'm trying to do is find a value in Column A and click the corresponding button/image in Column B.
When i record this event i get activate cell and select gridrecord
Can you please tell me how to perform this action.I have already installed TestAdvantage.
-Chetan
Hello,
This issue has been resolved as of the latest Service Release for TestAdvantage 2009 Volume 2 for QTP. You can download the Service Release by click the Account link at the top of the page and selecting Keys & Downloads from the left side of the page that loads. Select the TestAdvantage tab and then select TestAdvantage for Windows Forms 2009 Volume 2. You'll see the Service Releases listed on the Service Releases tab that appears at the bottom of the page.
Yes, I tried without quotes, but I got the below error message
IG : [GetCellProperty] : Unable to cast object of type 'System.Int16' to type 'System.String'.
Does it work if you remove the quotes from around the 3? For example:
MsgBox SwfWindow("Window").SwfTable("Table").GetCellProperty("1",3,"x")
Let me know if you have any questions with this matter.