I'm using QTP 9.2 with TestAdvantage 2006 v2 CLR 1.x and I would like to know how I can determine if a cell in an UltraGrid has a status of "Allow Edit" or "No Edit". Certain cells in the grid of our application should have a status of "Allow Edit" all of the time, while other cells should have a status of "No Edit" only in certain instances, so I'm trying to check those in my test scripts.
I've spied on the grid with the .Net Object Spy and found the following: Display Layout > Bands > 0 > Columns > (Column Name) > Row Layout Column Info > Column > Cell Activation > AllowEdit, which I assume is the property I'm needing, but I'm not sure of the syntax for my test scripts to return that property. Here is an example of my scripts, but I'm obviously doing something wrong as when I message box the second line, I get an empty message:
SwfWindow("Company Name").SwfWindow("Purchase Order for Branch").SwfTable("ultraGrid1").ActivateCell "0","QuantityReceived"
SwfWindow("Company Name").SwfWindow("Purchase Order for Branch").SwfTable("ultraGrid1").GetROProperty ("CellActivation", "AllowEdit")
I've only been using TestAdvantage with QTP for about a year, so any help will be appreciated. Thank you!
The solution I gave will work for a single band. If you really want to tailor it down so that it ONLY works for a single band, all you need is the column key and the row index.
Below is the code. We are using TD 2007 Vol 3. Please help us in this regard.
Thank you inadvance...
I can only guess that you may have copied the code I gave you incorrectly, as ParentRow as an object is not used after it is set except in an If block that checks to see if the ParentRow is empty, which should by definition make the error that you have described impossible if it was copied correctly.
I would suggest that you review how you implemented what I sent you previously, or just use my other suggestion, in the case of you using this in a single band only scenario, just use the row.Index for the row parameter of the SelectCell TestAdvantage method.
If you require additional assistance on this matter I would highly suggest you contact our developer support as they would be able to assist you better.
Thank you for your Great Support...
Im facing the following problem with an SwfTable
I have a listbox in each cell of the SwfTable.I have to select an item from the list in each cell of the SwfTable.
I used the Select Cell and Activate Cell but its throwing Run time error. Can someone help me!!!