How can I retrieve the data from ultrawingrid?
Firstly i added the ultrawingrid object to the script (“UltraGrid1Net()”). then
Dim MyTable As UltraGridTestObject
Dim Row As Integer
For Row = 0 To MyTable.GetRowCount() - 1
Dim Col As Integer
For Col = 0 To MyTable.GetColumnCount() - 1
msgbox("Value at cell {0}, {1}, {2}: {3}", ("Row"), ("Col"), ("is"), MyTable.GetCell(Row, Col)))
Next Col
Next Row
I got the above code from net and I modified according to my requirement, when I’m trying to compile the above code it is giving me the following error:
“Type ‘UltraGridTestObject’ is not defined”
Pls let me know is ‘UltraGridTestObject’ is right to use for ultrawingrid or let me know the appropriate object to use.
Another way to do this will be to use the GetData method of the grid test object, here is how:
Dim MyTable As Infragistics.RFT.NetTestObjects.UltraGridTestObject = UltraGrid1Table()
Dim data As Infragistics.RFT.Shared.Values.Array2DValue = MyTable.GetData(Nothing)
Dim outputText As String
For Row = 0 To data.RowCount - 1
For Col = 0 To data.CellCount - 1
outputText = String.Format("Value at cell {0}, {1}, is: {2}", Row, Col, data.GetValue(Row, Col))
LogTestResult(outputText, True)
Hi Ammar,
when i'm using the above code i'm getting "Type 'Infragistics.RFT.NetTestObjects.UltraGridTestObject'
not declared" error.
I need to import any header files??
Rekha.
Hi Rekha,
Since we are using the fully qualified name then we don't need to import anything. Are you adding the TestObject to the script? if not then you have to do this. You can do it by either record a click on the grid (then you can delete the script line and keep the test object). Another way to add the grid to the TestObject is by
Regards,
Ammar
1)I have added UltraGrid object to Object map. Again i'm getting the same error.('Infragistics.RFT.NetTestObjects.UltraGridTestObject' not defined')
2) i'm unable to import Infragistics.RFT.NetTestObjects namespace in script header.
Do i need to do any manual settings??
Did you add the Test object to the script? another way to do this will be to record a click on the control, this should take care of properly adding the reference to Infragistics.RFT.NetTestObjects.
If all of this does not work please let me there is one last thing you could try.
i tried by recording a click on the control, but still it is not working.
Rekha,
This issue has been brought to Developer Support's attention. We'll create a support case for you regarding this issue.
In the future, you can submit support requests with Developer Support directly, as detailed here.
There must be some configuration issue on your machine. Please contact Infragistics developer support for help in verifying the TestAdvantage configuration. Please remember that TestAdvantage version should match the NetAdvantage version used in your application.
Thanks alot.
i have installed RFT and TestAdvantage(Trial version) in another machine, here the above code is working perfectly.
Why i'm unable to do the same thing in my machine??
unable to import Infragistics.RFT
namespace??