Wish [B4X] Forms Builder - Buttons


Active Member
Licensed User
I do this in a Short Options cell click event in the B4XTable:

Dim DataD As Map = CreateMap()
Dim column As B4XTableColumn = B4XTable1.GetColumn(ColumnId)
Dim value As String = B4XTable1.GetRow(RowId).Get(ColumnId)
Prefdlg.Initialize(Base, "Type", 300dip, 60dip)
Prefdlg.Title = "New Type"
Prefdlg.ItemsBackgroundColor  = xui.Color_White
Prefdlg.TextColor = xui.Color_Black
Prefdlg.Theme = PrefDialog.THEME_LIGHT
Prefdlg.Dialog.PutAtTop = True
DataD.Put("Type", cell)
Wait For (Prefdlg.ShowDialog(DataD, "OK", "CANCEL")) Complete (Result As Int)
        If Result = xui.DialogResponse_Positive Then
            Dim ans As String =  DataD.Get("Type")
            B4XTable1.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(ans, RowId))
        End If
Could you maybe adapt that to handle your case?