Sub B4XTable1_CellClicked (ColumnId As String, RowId As Long)
'Below code to total the first 3 cols and put in col four when you click col 4. It also updates the in memory table
If ColumnId = "TOTAL(20)" Then
ie1.ExitEditMode
'ie1.CellClicked(ColumnId, RowId)
Dim tot As Double
Dim m As Map=B4XTable1.GetRow(RowId)
For Each k As String In m.Keys
If k <> "TOTAL(20)" And k<>"PRN" And k<>"ROLLNO" And k<>"NAME" Then
tot=tot+ m.Get(k)
End If
Next
Dim c As B4XTableColumn = B4XTable1.GetColumn("TOTAL(20)")
Dim pnl As B4XView = c.CellsLayouts.Get(RowId)
Dim lbl As B4XView = pnl.GetView(0)
lbl.Text = tot
B4XTable1.sql1.ExecNonQuery2("UPDATE data SET c6 = ? WHERE rowid = ?", Array As Object(tot, RowId)) 'c3 is the 4th col
B4XTable1.Refresh
Else
ie1.CellClicked(ColumnId, RowId)
End If
End Sub