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
Hi Srini,
This was an unknown limitation of the TestAdvantage UltraGridProxy that was resolved in the service release of TestAdvantage 2008 Volume 1 forward and in the release build of TestAdvantage 2010 Volume forward. In the stated releases you can now use : GetCellProperty(objRow, objColumn, strPropertyName)
using the following new properties :
"X" - X coordinate of the UltraGridCell UIElement "Y" - Y coordinate of the UltraGridCell UIElement "width" - width of the UltraGridCell UIElement "height" - height of the UltraGridCell UIElement
It should be stated that in the process of retrieving the property values it will bring the cell into view.
I hope this answers your question,
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
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.