B4J Library [B4X] [XUI] SD FlexGrid (Table)

Star-Dust

Expert
Licensed User
Longtime User
Release new version
  • 0.36
    • Fix bugs: SortForCol; SetColsNumber
 

David Hawkins

Active Member
Licensed User
Longtime User
Star-Dust excellent work sorting now sorted.
Regards
David

PS if it's not rude can I suggest some more changes in the future please, I have some ideas which I think will make the library the greatest grid on Earth-Solar System-Milky-Way-Universe.
 

Star-Dust

Expert
Licensed User
Longtime User
Of course you can suggest. I don't always have the time to make changes, but I'm happy to do it when I can.

I generally prefer improvements that are useful to everyone and that have general application. Some only suggest things that only serve their application but that others would not benefit from.
 

Star-Dust

Expert
Licensed User
Longtime User
Sorry there is no such function
 

David Hawkins

Active Member
Licensed User
Longtime User
Hi Star-Dust Are you saying that the text and background colors cannot be changed or that there is no 'EditCellonsite' function.

EditCellonsite:
        If Col = 2 Then
            FlexGrid1.EditCellonsite(Row, 2)
        End If

Regards

David
 

Star-Dust

Expert
Licensed User
Longtime User
Sorry there is no such function to change the background and text color for Editor Cell
 

David Hawkins

Active Member
Licensed User
Longtime User
Hi Star-Dust is there a way to center the FlexGrid1.TypeCheck the following code does not do it.

Flex Grid:
        FlexGrid1.ColsName = Array As String("Select", "LocationID", "Locations")
        'FlexGrid1.HeaderFont = xui.CreateDefaultBoldFont(16)
        FlexGrid1.ColsWidth = Array As Int(20%x, 0, 80%x)
        FlexGrid1.ColsType = Array As Int(FlexGrid1.TypeCheck, FlexGrid1.TypeInt, FlexGrid1.TypeString)
        FlexGrid1.ColsAlignment = Array As String("CENTER", "CENTER", "CENTER")
 

Star-Dust

Expert
Licensed User
Longtime User
  • Added: EditTextColor and EditBackgroundColor fields to be able to select colors for the on-site editable cell. By default it is black background and white text
fix bugs on rel. 0.38
 

Star-Dust

Expert
Licensed User
Longtime User
Update rel . 039

Singleline and multiline option of the design now also affects the column header and column foot
 

Mauricio Pereira

Member
Licensed User
Longtime User
Update rel . 039

Singleline and multiline option of the design now also affects the column header and column foot

Update rel . 039

Singleline and multiline option of the design now also affects the column header and column foot
Star-Dust
I'm using Flexgrid (excellent).
I'm having the following problem:
Several statements are executed and the table is assembled (using Flexgrid1.AddRow, etc...)
In the sequence, when the command "FlexGrid1.EditCellOnSite(0,0)" is executed, the program cancels with the message "java.lang.Runtime.Exception: Object should first be initialized (B4XView)".
What has to be initialized?
 

Star-Dust

Expert
Licensed User
Longtime User
I don't have this problem, please make a code example that throws you this error. Please specify which platform you are working on
 

Mauricio Pereira

Member
Licensed User
Longtime User
I don't have this problem, please make a code example that throws you this error. Please specify which platform you are working on
Star-Dust
My mistake.

I had set up the entire table structure but had not created the cells. So I was trying to edit what didn't exist.
Sorry for wasting your time but once again congratulations for the librarie.
 

Mauricio Pereira

Member
Licensed User
Longtime User
Star-Dust
My mistake.

I had set up the entire table structure but had not created the cells. So I was trying to edit what didn't exist.
Sorry for wasting your time but once again congratulations for the librarie.
Star-Dust
I have an application using your FlexGrid librarie.
It is basically a data entry table (only numbers and the letter M).
To enter data in each cell of the table I used a "own keyboard" and filled the cell with SendKeys.
It worked perfectly.
But, with Android 13, SendKeys doesn't work anymore.
Can I have access to the Flexgrid editing "field"?
I tried with Flexgrid getvalue and flexgrid setvalue but it doesn't work because when using these functions the editing of the cell "turns off".
If I had access to "edit variable", I could do, for example:
edit field = edit field & "1"", edit field = edit field & "2", etc...
Ideally, input values should appear in the cell being edited.
Thank you in advance for your attention.
 

Star-Dust

Expert
Licensed User
Longtime User
You can do this without accessing the view. Do not use EditCellOnSite but when you click on the cell you open your own panel with an EditText that you can customize as you wish
 

Mauricio Pereira

Member
Licensed User
Longtime User
You can do this without accessing the view. Do not use EditCellOnSite but when you click on the cell you open your own panel with an EditText that you can customize as you wish
Star-Dust,
Yes, I had already thought about this solution but, if I understand correctly, the entered data will appear in Editext and at the "end" will be moved to the cell being edited.
The solution with senkeys was more "elegant" because the data being entered appeared in the cell itself being edited.
 

Mauricio Pereira

Member
Licensed User
Longtime User
Star-Dust,
Initially, I clarify that all the questions below are exclusively by code, that is, without touching the screen.
In an application using your Flexgrid, we have 6 columns and several rows.
Because of the size of the screen, only 3 columns are displayed at a time. If we use EditOnSite, and scroll to the right in the same row, when we reach column 4 the screen scrolls automatically and columns 2, 3 and 4 are visible. Even when we reach the last column and move forward, the screen scrolls to column 1 of the next row.
When instead of Editonsite we use SelectCell, the scroll does not happen. So when we move from column 3 to 4 (by code), the cell is selected but invisible unless scrolling by hand.
My question is whether we can do this scrolling by code.
Thank you in advance for your attention.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…