B4J Question TableView Column Position

Agnetha

Member
Licensed User
Longtime User
Hello!

I have to set the column positions in TableView (NOT B4x Table) programmaticly, e.g. Col3, Col0, Col1, Col2.
How can i do that programmaticly ?
Thank you!
 

DarkoT

Active Member
Licensed User
Hi,
please, take a look on this example... If you will need help, let me know...


With small modification you can use the same logic with a TableView... Or I can prepare example which will help you to create end solution... ;)
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
Based on @Erels example Here ... which saves the column order on app close ... (when user manually reorders columns).

I have slightly modified the code to also programmatically reorder the columns and again save the order for next app run.

In the example this is done via Button click , and in a set new order, so you will have to think of an alternative way to work in with your app.

But it should give you a good insight how you might be able to solve your issue.
 

Attachments

  • TableExampleColumnSort.zip
    3.5 KB · Views: 6
Upvote 0

DarkoT

Active Member
Licensed User
Hello!

I have to set the column positions in TableView (NOT B4x Table) programmaticly, e.g. Col3, Col0, Col1, Col2.
How can i do that programmaticly ?
Thank you!
2024-07-04_07h38_48.gif


Or - maybe this will help you... If you need example, I can share this source to you...
 
Upvote 0

mangojack

Well-Known Member
Licensed User
Longtime User
@DarkoT .. the OP is wishing to sort the columns programmatically.
 
Upvote 0
Top