B4XTable is a paged based table. The UI is made of a horizontal xCLV. The data is stored in an in-memory SQLite database. How to use? 1. Add a B4XTable with the designer. 2. Add the columns: B4XTable1.AddColumn("US County", B4XTable1.COLUMN_TYPE_NUMBERS) B4XTable1.AddColumn("Name"...
www.b4x.com
At the moment I use TableView with EditText but it gets heavy with many lines.
There are files with more than 20000 lines to load and this makes the application extremely heavy when made in TableView with EditText.
Anyway, I'm trying to find a way to replace my C# - made apps with those made in B4J.
Edit : revisiting that link , the answer I gave was slightly incomplete , so ...
B4X:
SetValue (B4XTable1, "Name", 3, "ABC123") 'Table, Column, Row, Value
Sub SetValue (tbl As B4XTable, columnID As String, RowId As Long, Value As String) 'Value=String as Column declared as TEXT.
Dim column As B4XTableColumn = tbl.GetColumn(columnID)
tbl.sql1.ExecNonQuery2($"UPDATE data SET ${column.SQLID} = ? WHERE rowid = ?"$, Array As String(Value, RowId))
tbl.Refresh
End Sub
EDIT: Forget this post , that library is only for B4A and B4i. (I could remove this post but it could be useful to encourage the author of that library to create the B4J version ?)
I think he wants to be able to edit a cell directly, as you can do in Excel, for example, instead of show a dialog to do it.
Also, I think (I think too much and do little ?) that is possible to change that "way" (show a dialog) using a little trick: creating a transparent full screen panel, getting the cell screen coordinates, adding an EditText at the same position... in short, overlaying the label-cell with an EditText (only to edit the content, of course).
This class helps with adding inline editing features to B4XTable. Usage instructions: 1. Initialize an InlineEditing object, named 'ie' in the example. 2. Delegate the following events: Private Sub MainForm_Resize (Width As Double, Height As Double) ie.TableResized End Sub Sub...
Hey, mangojack!
Thanks for the quick answer.
In the first link that passed, I already knew the solution, but I need to edit in the cell itself and not through an editable box.
It is excellent for Android and iOS, but for B4J it loses agility.
Following the discussion, in the end, Erel passed the solution that it should resolve.
I've set an example and I'll work on it.
I think he wants to be able to edit a cell directly, as you can do in Excel, for example, instead of show a dialog to do it.
Also, I think (I think too much and do little ?) that is possible to change that "way" (show a dialog) using a little trick: creating a transparent full screen panel, getting the cell screen coordinates, adding an EditText at the same position... in short, overlaying the label-cell with an EditText (only to edit the content, of course).
Hello LucaMs!
Thanks for the feedback.
I didn't know SD FlexGrid. Although it is for B4A and B4i, I will find out if it is adaptable to B4J or if I can replicate in a project I have in B4A/i. very useful.
Finally, I even tried to do like you mentioned creating a box with cell coordinates ... an engineering that saw no end and gave up thinking it was better to ask at the forum hehehe.
But I think Erel posted a solution that I'll see if I can do everything in it.
Again, thanks for your help.
This class helps with adding inline editing features to B4XTable. Usage instructions: 1. Initialize an InlineEditing object, named 'ie' in the example. 2. Delegate the following events: Private Sub MainForm_Resize (Width As Double, Height As Double) ie.TableResized End Sub Sub...