B4X Store

ELEVATEUI · B4A · XUI

UIEditableTable

Editable spreadsheet-style grids for structured data entry.

78 modules 1,780 APIs

Navigation & onboarding

What it solves

Editable spreadsheet-style grids for structured data entry.

Animated conceptual demonstration, not an exact Android control screenshot.

39 methods3 Designer4 events

When to use this module

Create an inventory editor with row insertion, column changes and cell-edit events connected to your data model.

Before integrating, examine its methods, events and Designer options.

B4A integration examples

Tutorials are based on existing project examples or audited APIs. Check each example’s prerequisites; B4A compilation is not claimed.

Editable inventory with calculated totals
Existing documentation example uieditabletable.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

Sub Globals
    Private xui As XUI
    Private Editable As UIEditableTable
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Editable.Initialize(Me, "Editable")
    Editable.AddToParent(Activity, 10dip, 22dip, Activity.Width - 20dip, 390dip)
    Editable.AddColumns(Array As String("Producto", "Cantidad", "Precio", "Total"))
    Editable.SetColumnType(1, Editable.COLUMN_TYPE_NUMBER)
    Editable.SetColumnType(2, Editable.COLUMN_TYPE_DECIMAL)
    Editable.AddRow(Array As String("Cacao", "2", "12.50", ""))
    Editable.AddRow(Array As String("Café", "3", "7.50", ""))
    Editable.SetFormula(3, 0, "=B1*C1")
    Editable.SetFormula(3, 1, "=B2*C2")
End Sub

Private Sub Editable_CellClick(Col As Int, Row As Int)
    Log("Celda: " & Col & "," & Row & " = " & Editable.GetValue(Col, Row))
End Sub
Formulas and custom functions
Existing documentation example uieditabletable.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

' Editable ya tiene cuatro columnas y tres filas.
Editable.SetValue(1, 0, "2")
Editable.SetValue(1, 1, "3")
Editable.SetValue(1, 2, "5")
Editable.SetFormula(3, 0, "=SUM(B1:B3)")
Editable.SetFormula(3, 1, "=AVERAGE(B1:B3)")
Dim parametros As List
parametros.Initialize
parametros.Add("x")
Editable.SetFormulaFunction("DOBLE", parametros, "x*2")
Editable.SetFormula(3, 2, "=DOBLE(B3)")
Log(Editable.GetFormula(3, 2))
Log(Editable.GetValue(3, 2))
Filters, search and localization
Existing documentation example uieditabletable.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

' Ejecutar después de crear Editable y cargar datos.
Editable.Language = "es"
Editable.SetTheme("Ocean")
Editable.SetFilterEnabled(True)
Editable.AddSearchBox

Private Sub Editable_FilterChanged(ActiveFilters As Int)
    Log("Filtros activos: " & ActiveFilters)
End Sub
Images and controls embedded in cells
Existing documentation example uieditabletable.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

' producto.png debe estar en Files.
Dim foto As Bitmap = LoadBitmap(File.DirAssets, "producto.png")
Editable.SetHeaderImage(0, foto, 20dip, 20dip)
Editable.SetCellImage(0, 0, foto, 28dip, 28dip)
Dim estado As Label
estado.Initialize("")
estado.Text = "✓"
estado.TextColor = Colors.Green
Editable.AddCellElement(0, 0, estado.As(B4XView), 5dip, 2dip, 26dip, 24dip)
Save and restore settings
Existing documentation example uieditabletable.json Not B4A-compiled

Review required libraries, Designer views and input data before compiling in B4A.

Editable.SetTheme("Graphite")
Dim p As List
p.Initialize
p.Add("x")
Editable.SetFormulaFunction("DOBLE", p, "x*2")
Editable.SaveProperties(File.DirInternal, "tabla.map")

' En otra sesión, una vez creada Editable:
Editable.LoadProperties(File.DirInternal, "tabla.map")

Public methods reference

39 audited signatures

Public Sub Initialize(Callback As Object, EventName As String)

Prepare the instance before its other methods.

Callback As ObjectEventName As String
Public Sub AddToParent(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Add this view to a parent container using the supplied bounds and options.

Parent As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
Public Sub AddToView(Parent As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Use AddToView for its named operation; follow its exact signature.

Parent As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
Public Sub DesignerCreateView(Base As Object, Lbl As Label, Props As Map)

Invoked automatically by the B4A Visual Designer; do not call manually.

Base As ObjectLbl As LabelProps As Map
Public Sub setLanguage(Language As String)

Update language at runtime when this setting changes.

Original catalog note: Sets the table UI language. Use Auto to follow the device language.

Language As String
Public Sub getLanguage As String

Read the current language value for validation or UI synchronization.

Returns: String

Public Sub SetFilterEnabled(Enabled As Boolean)

Use SetFilterEnabled for its named operation; follow its exact signature.

Original catalog note: Shows or hides the optional toolbar filter action. Disabled by default.

Enabled As Boolean
Public Sub GetFilterEnabled As Boolean

Use GetFilterEnabled for its named operation; follow its exact signature.

Returns: Boolean

Public Sub AddColumns(Columns() As String)

Use AddColumns for its named operation; follow its exact signature.

Columns( As unknown

Returns: String)

Public Sub SetColumnType(Index As Int, ColumnType As Int)

Use SetColumnType for its named operation; follow its exact signature.

Original catalog note: Sets the editor keyboard for a column. Numeric columns use a number pad; decimal columns use the decimal-number keyboard.

Index As IntColumnType As Int
Public Sub GetColumnType(Index As Int) As Int

Use GetColumnType for its named operation; follow its exact signature.

Index As Int

Returns: Int

Public Sub AddSearchBox

Use AddSearchBox for its named operation; follow its exact signature.

Original catalog note: Opens a floating search panel for all columns. The column menu can scope it to one column.

Public Sub DeleteSelectedRow

Use DeleteSelectedRow for its named operation; follow its exact signature.

Original catalog note: Deletes the currently selected row, if a cell is selected.

Public Sub DeleteRow(RowIndex As Int)

Use DeleteRow for its named operation; follow its exact signature.

Original catalog note: Deletes the row at the specified zero-based index.

RowIndex As Int
Public Sub AddColumn(NewColumnName As String)

Use AddColumn for its named operation; follow its exact signature.

NewColumnName As String
Public Sub AddRow(Values() As String)

Use AddRow for its named operation; follow its exact signature.

Values( As unknown

Returns: String)

Public Sub AddEmptyRow

Use AddEmptyRow for its named operation; follow its exact signature.

Public Sub AddEmptyRows(Count As Int)

Use AddEmptyRows for its named operation; follow its exact signature.

Original catalog note: Adds multiple empty rows to the table.

Count As Int
Public Sub AddRows(Rows As List)

Use AddRows for its named operation; follow its exact signature.

Rows As List
Public Sub GetValue(Col As Int, Row As Int) As String

Use GetValue for its named operation; follow its exact signature.

Col As IntRow As Int

Returns: String

Public Sub SetValue(Col As Int, Row As Int, Value As String)

Use SetValue for its named operation; follow its exact signature.

Col As IntRow As IntValue As String
Public Sub SetHeaderImage(Col As Int, Image As Bitmap, Width As Int, Height As Int)

Use SetHeaderImage for its named operation; follow its exact signature.

Original catalog note: Adds or replaces a bitmap beside a column heading. Use 0 for a compact default size.

Col As IntImage As BitmapWidth As IntHeight As Int
Public Sub ClearHeaderImage(Col As Int)

Use ClearHeaderImage for its named operation; follow its exact signature.

Col As Int
Public Sub GetCellContentPanel(Col As Int, Row As Int) As B4XView

Use GetCellContentPanel for its named operation; follow its exact signature.

Original catalog note: Returns the transparent host panel for a cell; add multiple B4X/ElevateUI views to it.

Col As IntRow As Int

Returns: B4XView

Public Sub AddCellElement(Col As Int, Row As Int, Element As B4XView, Left As Int, Top As Int, Width As Int, Height As Int)

Use AddCellElement for its named operation; follow its exact signature.

Original catalog note: Places an already-created B4X view inside a cell (coordinates are relative to that cell).

Col As IntRow As IntElement As B4XViewLeft As IntTop As IntWidth As IntHeight As Int
Public Sub SetCellImage(Col As Int, Row As Int, Image As Bitmap, Width As Int, Height As Int)

Use SetCellImage for its named operation; follow its exact signature.

Col As IntRow As IntImage As BitmapWidth As IntHeight As Int
Public Sub ClearCellImage(Col As Int, Row As Int)

Use ClearCellImage for its named operation; follow its exact signature.

Col As IntRow As Int
Public Sub ClearCellElements(Col As Int, Row As Int)

Use ClearCellElements for its named operation; follow its exact signature.

Col As IntRow As Int
Public Sub SetFormula(Col As Int, Row As Int, Formula As String)

Use SetFormula for its named operation; follow its exact signature.

Original catalog note: Sets a spreadsheet-style formula such as "=A1+B1". References use A1 notation.

Col As IntRow As IntFormula As String
Public Sub GetFormula(Col As Int, Row As Int) As String

Use GetFormula for its named operation; follow its exact signature.

Original catalog note: Returns the stored formula, or an empty string when the cell is a literal value.

Col As IntRow As Int

Returns: String

Public Sub SetFormulaFunction(FunctionName As String, Parameters As List, Expression As String)

Use SetFormulaFunction for its named operation; follow its exact signature.

Original catalog note: Registers a reusable arithmetic formula, for example DUPLICAR(x) = x*2. The definition is saved with the table properties and restored by SetProperties / LoadProperties.

FunctionName As StringParameters As ListExpression As String
Public Sub RemoveFormulaFunction(FunctionName As String)

Use RemoveFormulaFunction for its named operation; follow its exact signature.

Original catalog note: Removes a custom formula function and its persisted definition.

FunctionName As String
Public Sub GetProperties As Map

Use GetProperties for its named operation; follow its exact signature.

Original catalog note: Returns a copy of the table properties so the caller can persist them with its settings store.

Returns: Map

Public Sub SetProperties(Properties As Map)

Use SetProperties for its named operation; follow its exact signature.

Original catalog note: Restores properties previously returned by GetProperties.

Properties As Map
Public Sub SaveProperties(Dir As String, Filename As String)

Use SaveProperties for its named operation; follow its exact signature.

Original catalog note: Writes the current theme properties to a caller-selected settings file.

Dir As StringFilename As String
Public Sub LoadProperties(Dir As String, Filename As String)

Use LoadProperties for its named operation; follow its exact signature.

Original catalog note: Loads theme properties previously written with SaveProperties.

Dir As StringFilename As String
Public Sub SetTheme(ThemeName As String)

Use SetTheme for its named operation; follow its exact signature.

ThemeName As String
Public Sub GetThemeNames As List

Use GetThemeNames for its named operation; follow its exact signature.

Returns: List

Public Sub GetBase As B4XView

Use GetBase for its named operation; follow its exact signature.

Returns: B4XView

Designer · 3

#DesignerProperty: Key: Theme, DisplayName: Theme, FieldType: String, DefaultValue: Mint, List: Mint|Ocean|Violet|Graphite|Rose|Amber|Lagoon|Transparent, Description: Table color palette#DesignerProperty: Key: FilterEnabled, DisplayName: Enable filters, FieldType: Boolean, DefaultValue: False, Description: Show the filter button and floating filter panel#DesignerProperty: Key: Language, DisplayName: Language, FieldType: String, DefaultValue: Auto, List: Auto|ar|bn|de|en|es|fr|hi|pt|ru|zh, Description: UI language; Auto follows the device language

Public events and how to implement them · 4

Initialize with Me and the event prefix Demo, then add the following handler to your B4A module. Names and arguments come from the library declaration.

CellClick (Col As Int, Row As Int)

Raised when the user taps the control; use it to trigger a real action.

B4A handler signature with Demo prefix

Private Sub Demo_CellClick(Col As Int, Row As Int)
    Log("CellClick")
End Sub
ThemeChanged (ThemeName As String)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_ThemeChanged(ThemeName As String)
    Log("ThemeChanged")
End Sub
ColumnDeleted (Col As Int)

Event declared by this module. Handle the indicated action in the callback.

B4A handler signature with Demo prefix

Private Sub Demo_ColumnDeleted(Col As Int)
    Log("ColumnDeleted")
End Sub
FilterChanged (ActiveFilters As Int)

Raised when a selection or value changes; use it to update dependent data.

B4A handler signature with Demo prefix

Private Sub Demo_FilterChanged(ActiveFilters As Int)
    Log("FilterChanged")
End Sub

For code-created controls use Initialize(Me, "Demo") when that signature exists; for Designer controls set the event name there. Replace Demo with the actual prefix.

Public fields, constants and types

Public Const COLUMN_TYPE_TEXT = 1 As IntPublic Const COLUMN_TYPE_NUMBER = 2 As IntPublic Const COLUMN_TYPE_DECIMAL = 3 As IntPublic mBase As B4XViewPublic Grid As UITable
Source: ElevateUI public API catalog; tutorials cross-checked against ElevateUI(6).b4xlib. Visualizations are illustrative; sample code requires B4A compilation.