on 05-19-2010 7:46 PM
I am trying to load cell contents from a grid view control into arrays. The grid has 400 entries in it. The arrays are loaded up with data until element (or row) 81, then from 82 - 400 they are loaded with blanks. I am not getting any errors. Anyone have any suggestions?
Dim iRowCount As Integer
Dim sContractAcct() As String
Dim sDocNbr() As String
iRowCount = session.findById("wnd[0]/usr/txtGD-NUMBER").Text
ReDim sDocNbr(iRowCount)
ReDim sContractAcct(iRowCount)
For i = 0 To iRowCount - 1
sDocNbr(i) = session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").GetCellValue(i, "OPBEL")
sContractAcct(i) = session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").GetCellValue(i, "VKONT")
Next
Thanks for the tip. I ended up doing the following and that fixed it:
session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").firstVisibleRow = i
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi jabthall,
It may be that only visible lines may be edited. In this case, the visible line should be adjusted again and again.
For example:
. . .
For i = 0 To iRowCount - 1
session.findById("wnd[0]/usr/. . .").verticalScrollbar.position = i
sDocNbr(i) = session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").GetCellValue(i, "OPBEL")
sContractAcct(i) = session.findById("wnd[0]/usr/cntlRESULT_LIST/shellcont/shell").GetCellValue(i, "VKONT")
Next
The best way is to draw the command with the script recorder.
Regards,
ScriptMan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.