B4J Question [SOLVED][Web][BANano] custom SKDataTable

FabioRome

Active Member
Licensed User
Longtime User
I’m trying to set custom values in SKDataTable but they have no effect:
it doesn’t work with EntriesText, it doesn’t work with SearchPlaceHolder, and it doesn’t work with the column where I want to perform the search:
where am I going wrong?
I want the search to work with col10
I’d also like the “Previous” and “next” text to be customized in Italian: “Precedente” and “Successivo”

Here’s the code:
B4X:
Private tblDatiElenco As SKDataTable 'ignore

    tblDatiElenco.Clear

    tblDatiElenco.Height = "100%"
    tblDatiElenco.Title = "mio testo"
    tblDatiElenco.ItemsPerPage = 5
    tblDatiElenco.EntriesText= "Item visualizzati"
    tblDatiElenco.SearchPlaceHolder = "Cerca..."
    
    tblDatiElenco.AddColumn( "Col1" , False, False, False, False)
    tblDatiElenco.AddColumn( "Col2" , False, False, False, False)
    tblDatiElenco.AddColumn( "Col3" , False, False, False, False)
    tblDatiElenco.AddColumn( "Col4" , False, False, False, False)
    tblDatiElenco.AddColumn( "Col5" , False, False, False, False)
    tblDatiElenco.AddColumn( "Col6" , False, False, False, False)
    tblDatiElenco.AddColumn( "Col7" , False, False, False, False)
    
    tblDatiElenco.AddColumn( "Col8" , False, False, True, True)
    tblDatiElenco.AddColumn( "Col9" , False, False, True, True)
    tblDatiElenco.AddColumn( "Col10" , False, True, True, True)
    tblDatiElenco.AddColumn( "Col11" , False, False, True, True)
    tblDatiElenco.AddColumn( "Col12" , False, False, True, True)
    tblDatiElenco.AddColumn( "Col13" , False, False, True, True)

    tblDatiElenco.Render
 
Solution
There were indeed some mistakes in the datatable.js file I wrapped. Attached you can find the latest BANano and BANanoSkeleton libraires (v 9.25).

Notes:

1. BANano.Initialize has an extra parameter the 'appID'. Must be unique for each WebApp.
2. Search should work now. It previously searched in the column after the one you marked as searchable (so in your case in Prenotazioni)
3. You can now set the translation for the previous and next buttons:

tblDatiElenco.PreviousText = "Precedente"
tblDatiElenco.NextText = "Successivo"

Download: https://gorgeousapps.com/BANanoAndBANanoSkeleton9.25.zip

FabioRome

Active Member
Licensed User
Longtime User
that is only very little info. Attach a short project or at least show us what your "sub tblDatiElenco_RenderColumn(parentElement As BANanoElement, data As List, column As Int) As Boolean" looks like.

Thank you for the support. I’m attaching a zip file with an excerpt from the project.


I also have a question for SKModal: should I open another thread? Thanks.
 

Attachments

  • testpwa.zip
    43.3 KB · Views: 1
Upvote 0

alwaysbusy

Expert
Licensed User
Longtime User
There were indeed some mistakes in the datatable.js file I wrapped. Attached you can find the latest BANano and BANanoSkeleton libraires (v 9.25).

Notes:

1. BANano.Initialize has an extra parameter the 'appID'. Must be unique for each WebApp.
2. Search should work now. It previously searched in the column after the one you marked as searchable (so in your case in Prenotazioni)
3. You can now set the translation for the previous and next buttons:

tblDatiElenco.PreviousText = "Precedente"
tblDatiElenco.NextText = "Successivo"

Download: https://gorgeousapps.com/BANanoAndBANanoSkeleton9.25.zip
 
Upvote 0
Solution

FabioRome

Active Member
Licensed User
Longtime User
Thank you so much
now the custom and search work well.

I really appreciate BANANO, just like I appreciate ABMaterial; they are both fantastic projects.
 
Upvote 0
Top