cancel
Showing results for 
Search instead for 
Did you mean: 

Gridview stops loading cell contents at row 81

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

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

script_man
Active Contributor
0 Kudos

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