B4J Question [ABMaterial] How to sort table on hidden column

Rob White

Member
Licensed User
Hi All,

I would like to be able to sort an ABMTable by a column I have turned off (.SetColumnVisible = False)

I can set the column with Tbl.SetSortColumn but how do I "programmaticly click the column header?"

I also noticed the usingQueriesToSort = true/false option in the init routine but what has to be done after that?
 

Harris

Expert
Licensed User
Is your Abmtable derived from a sql table? If so, sort the dataset first then add each to Abmtable.
Again, we guess as to what u are working with and what you are trying to accomplish....

In ur question.... SAY... heres what i have.... Here is what i am trying to do....

Only the Great Kreskin professed to be a mind reader.... But then the Great Erel seems to have inhereted some of his powers, or, slight of hand... However, i have never seen him bend spoons....

U dont have to click (programatically) on an invisable column, u have to load the Abmtable with the desired sort order initially....
 
Upvote 0

Rob White

Member
Licensed User
I have a table of agricultural chemicals. I need to give the user two ways to sort these.
1] Alphabetical
2] I log the number of times a chemical is used so would like to present the most popular choices at the top of the list.

Yes the data is in an SQL table but I am not too happy to download this data every time the sort option is changed.
I thought the best solution would be to allow the table to do the sorting. I was thinking of two button in the footer to trigger the sorting. I do not want to display the number of hits.
 
Upvote 0

Harris

Expert
Licensed User
download this data every time
Question: What is "this data" to download every time: 10 records (no problem) - 500 records (still no problem)... 10,000 records or more (could be a performance problem).
If you use ABMpagination - and understand the SQL concept - then this is not an issue.... Very quick and very little data load...

Rarely will I present the entire dataset that fits the scope of the query. I LIMIT it, so pagination can handle the "limited" results without downloading - potentially - many thousands of records....
 
Upvote 0

Rob White

Member
Licensed User
Thank you good advice to a novice web app programmer. I will more than likely have no problem with about 300 records from a single table and only one column.
 
Upvote 0
Top