Hi, I'm trying to add new rows to a datagrid from values of textboxes, it works fine but when the rows of the grid are bigger than the visible size of it, it gives an error of "incorrect number of line", i think it has to do something with the bookmark but i'm not very sure, can someone help plz?

VB Code:
  1. ' Set new recordset to add the new row
  2. Set rsArray = New ADODB.Recordset
  3.             With rsArray
  4.                
  5.                .Fields.Append "ID_MONTO_ADICIONAL", adInteger
  6.                .Fields.Append "CONCEPTO_MONTO", adVarChar, 50
  7.                .Fields.Append "MONTO_ADICIONAL", adDouble
  8.                .CursorType = adOpenStatic
  9.                .LockType = adLockOptimistic
  10.                .Open
  11.  
  12.                '--load all the records that were before
  13.                Dim i As Integer
  14.                For i = 0 To can_filas - 1 ' can_filas has already the number of rows before adding a new one
  15.                    Me.dgMontosAdic.RowBookmark (i) [B]'--Get a row of the grid, gives error here when i insert record 11, and the visible size of the grid is 10[/B]
  16.  
  17. ' Add all rows that were before
  18.                    .AddNew
  19.                    ![ID_MONTO_ADICIONAL] = i + 1
  20.                    ![CONCEPTO_MONTO] = Me.dgMontosAdic.Columns(1).Text
  21.                    ![MONTO_ADICIONAL] = Me.dgMontosAdic.Columns(2).Text
  22.                Next
  23.                
  24.                '--Add the new record
  25.                .AddNew
  26.                ![ID_MONTO_ADICIONAL] = i + 1
  27.                ![CONCEPTO_MONTO] = txtConcepto.Text
  28.                ![MONTO_ADICIONAL] = txtMonto.Text
  29.                
  30.                .Update
  31. ' update the number of rows
  32.                can_filas = can_filas + 1
  33.             End With
  34.            
  35. ' update the grid with the new recordset and the new row.
  36.             Set Me.dgMontosAdic.DataSource = rsArray

i hope u understand me, and thanks in advance for help