Sub DeleteRow ( RowId As Long)
B4XTable1.sql1.ExecNonQuery2("DELETE FROM data WHERE rowid = ?", Array (RowId))
Dim page As Int = B4XTable1.CurrentPage
Dim FirstIndex As Int = B4XTable1.FirstRowIndex
B4XTable1.ClearDataView 'Updates the rows count.
If FirstIndex + 1 >= B4XTable1.mCurrentCount Then
page = page - 1
End If
B4XTable1.CurrentPage = page
End Sub
Private Sub btntestDelete_Click
Dim whichrow As String = txtfWhere.Text.Trim 'row number to delete
If IsNumber(whichrow)=False Then Return
'ie.ExitEditMode
DeleteRow(whichrow)
ie.DataUpdated 'does nothing
B4XTable1.UpdateTableCounters 'does nothing
B4XTable1.ClearDataView 'does nothing
Log("size"&B4XTable1.Size)
End Sub