Object Variable Not Set
Hi
The scripts I have pasted below consists of two different properties (DisplayText & EditValue) that I tried using to select the Dev xpress grid cell. Both the properties are having same Class names as 'System String'. The 'DisplayText' property i was using before was giving wrong results as the values assigned are not correctly assigned as I look in object browser. So, now I would like to use 'EditValue' property of the object which is more accurate.The problem is when I replace 'DisplayText' with EditValue in the same script I used before throws error: 'object variable not set' at 'nRow = tblCell.EditValue'. Using 'nRow = tblCell.DisplayText' does not throw error.
Sub selectrow
Set pnlObj = Sys.Browser().Page().Form().Panel()
Set tblObj = pnlObj.Object(dir).SlObject("gridfrmobj").SlObjec("Grid").SlObject("dataPresenter")
For i = 0 to tblObj.ChildCount - 1
Set tblCell = tblObj.SlObject("TextEdit", "", i)
nRow = tblCell.EditValue
If nRow = "John" Then
Log.Message("FOUND")
'ElseIf ...
.........
Exit For
End If
Next
End Sub
So, how can I use EditValue property without errors?
Thanks in advance
P Kumar