Hello,
I am having a problem with deleting multiple records in a flexgrid. Here is the code snippet:
Dim varRowCount As Integer
Dim ii As Integer
delinvno = TextInvno.Text
varRowCount = Cwayflex.Rows - 1
For ii = 0 To varRowCount
If Cwayflex.TextMatrix(ii + 1, COL_DELETEEXTRACWAY) = "1" Then
Cwayflex.RemoveItem Cwayflex.Row
varRowCount = Cwayflex.Rows
End If
Next ii
Basically I have an empty first column if the user select the column. A little check appears that tells them that the row(s) is selected. There is
an extra column that is marked "1" when the check appears. So I scan the rows for the "1" value. It deletes the first value find but the rowcount is not reset. I tried to reset the rowcount right after a row is deleted but it still increments past the number of rows and gives the "out of script error" Any suggestions would be greatly appreciated.
Thanks,
M.
I am having a problem with deleting multiple records in a flexgrid. Here is the code snippet:
Dim varRowCount As Integer
Dim ii As Integer
delinvno = TextInvno.Text
varRowCount = Cwayflex.Rows - 1
For ii = 0 To varRowCount
If Cwayflex.TextMatrix(ii + 1, COL_DELETEEXTRACWAY) = "1" Then
Cwayflex.RemoveItem Cwayflex.Row
varRowCount = Cwayflex.Rows
End If
Next ii
Basically I have an empty first column if the user select the column. A little check appears that tells them that the row(s) is selected. There is
an extra column that is marked "1" when the check appears. So I scan the rows for the "1" value. It deletes the first value find but the rowcount is not reset. I tried to reset the rowcount right after a row is deleted but it still increments past the number of rows and gives the "out of script error" Any suggestions would be greatly appreciated.
Thanks,
M.