Problem with databases and sortable option

Discuss GUI programming with the RapaGUI plugin here
Post Reply
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Problem with databases and sortable option

Post 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 ?
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with databases and sortable option

Post 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.
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem with databases and sortable option

Post 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.
User avatar
airsoftsoftwair
Posts: 5446
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Problem with databases and sortable option

Post 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.
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem with databases and sortable option

Post 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.
papiosaur
Posts: 161
Joined: Fri Mar 31, 2023 1:34 pm

Re: Problem with databases and sortable option

Post 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.
Post Reply