Replies
Hello,
When a value list is used within the WinGrid, selecting a value from the list through the UI will set the cells value to the value from the list. As such, SetCellData will have the same result as if the user were to click the drop down and select a value themselves.
My recommendation is to use SetCellData for both entering a value in the list and entering a value that isn't in the list and then also simply verify the contents of the list by getting each item in the list.
If you still find that it is necessary to drop down the list and select a value, you could Click method passing in the x and y coordinates or you could use QTP to do a low level recording. Both approaches would be more difficult to read and maintain than using SetCellData.
Let me know if you have any questions with this matter.
Alan
Hello,
Typically you would use the SetCellData method of SwfTable to set the value of the grid cell. On replay, this won't actually drop down the combo box, but will select the value if it is valid and fire the relevant grid events.
The best way to see the syntax for what to pass into SetCellData is to record setting the value on a cell in the grid as this will give you the appropriate values for the row and column parameters to this method.
Let me know if you have any questions with this matter.
Alan
Robert,
I assume that you want to activate a cell as the WinTree only has node selection not cell selection. If this is the case, you can use the ActivateCell method of the SwfTreeView. There are two parameters for the ActivateCell method, the first is the nodeId and the second is the cellKey. To learn what these values should be, I recommend recording on your application and seeing what is recorded for the ActivateCell method.
The following is an example of the ActivateCell method that works with the UltraTree Cell Editing Demo:
SwfWindow("UltraTree Cell Editing").SwfTreeView("ultraTree1").ActivateCell "\0\3", "Title"
For Right Clicking, you can right click a node with the RightClick method:
SwfWindow("UltraTree Cell Editing").SwfTreeView("ultraTree1").RightClick "\Employees\4"
If you need to be able to click on a specific cell, then you will need to use the Click method that is common to all objects and use mouse coordinates.
Let me know if you have any questions with this matter.
Alan