Page 1 of 1

Problem with databases and sortable option

Posted: Wed Aug 09, 2023 6:25 pm
by papiosaur
Hello,

i have a problem with sortable option fot the columns.

When i load a table with sortable option for column = false (or removed) all is ok.

If i active sortable=true for all columns, the table is not in the good order...

Seems the default order is for first column not hidden and ascending but is not the order of the table...

I would like to have the good order of the table.

Any ideas please ?

Re: Problem with databases and sortable option

Posted: Wed Aug 16, 2023 12:22 pm
by airsoftsoftwair
papiosaur wrote: Wed Aug 09, 2023 6:25 pm I would like to have the good order of the table.
What is the "good order"? I don't really understand what the problem here is. Please provide an MCVE to illustrate your problem so that we can help you.

Re: Problem with databases and sortable option

Posted: Wed Aug 16, 2023 2:03 pm
by papiosaur
The "good order" is the order of the table without sort, i would like obtain just the table in the order of the table.

I have just activated sortable= "true" for all columns and when i load the table, the order is not the same of the order of the table.

Seems by default, there is a ascending order in first column has sortable = "true" option. I don't want this sort at the load of the table if possible.

I didn't use "sortorder" option.

Re: Problem with databases and sortable option

Posted: Sun Aug 20, 2023 11:58 am
by airsoftsoftwair
papiosaur wrote: Wed Aug 16, 2023 2:03 pm The "good order" is the order of the table without sort, i would like obtain just the table in the order of the table.

I have just activated sortable= "true" for all columns and when i load the table, the order is not the same of the order of the table.
Why do you set sortable="true" at all if you want to use the order of the table? If the order of items in the table already reflects the order you want to have in the listview, I don't understand why you set the sortable="true" attribute at all.

Re: Problem with databases and sortable option

Posted: Sun Aug 20, 2023 10:06 pm
by papiosaur
It's difficult to explain.

I would like to use sortable option but i have a problem when i load a table, the order in the listview is not the order of the table...

For example, when i load a table with dates, the dates are in ascending sort by default and not in the descending sort (the order of the table in the file).

I try to do a short example soon.

Re: Problem with databases and sortable option

Posted: Sat Jan 27, 2024 5:04 am
by papiosaur
Problem solved.

The sort by date was not the good because when there was two entries in the same date, Hollywood sorted by alphabetic order for the second column and the sort don't match with original database.

I have added the time in the column "date" and now the sort is good.