Sorting by Date in listview - best strategy?
Posted: Fri Oct 10, 2025 10:05 am
Hi, it is me again
....next question concerning my ToDo List projekt ("ticklish"):
I made 2 columns "sortable" via my xml file:
When clicking on the column titel "Description" all items will be sorted alphabetically = o.k.
When clicking on the column titel "Date" all items will be sorted alphabetically = but I want them sorted by Date...
As far as I have read, listviews "inbuild sortfunction" is always alphabetically, and there is no chance to switch to another sort order, correct?
Ideas for an easy strategy to overcome this problem would be very wellcome:
Idea 1:
Force the user to enter Date in YYYY-MM-DD...would make it sortable, hower displaying Dates in such a format is not really an option...
idea 2:
???
I made 2 columns "sortable" via my xml file:
Code: Select all
<listview height="200" id="lstv_main" notify="active; LongClick; ClickColumn; SortColumn">
<column align="center" width="50" title="Status" checkbox="true"></column>
<column title="Description" width="100" editable="true" sortable="true"></column>
<column title="Date" editable="true" sortable="true"></column>
When clicking on the column titel "Date" all items will be sorted alphabetically = but I want them sorted by Date...
As far as I have read, listviews "inbuild sortfunction" is always alphabetically, and there is no chance to switch to another sort order, correct?
Ideas for an easy strategy to overcome this problem would be very wellcome:
Idea 1:
Force the user to enter Date in YYYY-MM-DD...would make it sortable, hower displaying Dates in such a format is not really an option...
idea 2:
???