Found another issue that I suspect might be a bug.
When clicking in a column in order to set it sortable, it will return the wrong column number if the list is scrolled horisontally.
Resizing the columns so that the list fits the window without any horisontal scoll will make it return the correct columnnumber.
ListviewColumn Sortable="0"
Re: ListviewColumn Sortable="0"
I can only get to sort the first column that I click on (whether that be column a,b,c or d). If I selected another column, it won't sort, but if I go back to the first column I clicked on then I can sort that again.
Does it work like that for you? I see the little sort character "^" above the columns as I click on them, but they only sort for that first column once it is selected again.
Does it work like that for you? I see the little sort character "^" above the columns as I click on them, but they only sort for that first column once it is selected again.
Re: ListviewColumn Sortable="0"
No sooner had I sent that post that I found the solution.
You cannot use
This will cause the issue I mentioned above.
Dave
You cannot use
Code: Select all
moai.DoMethod("listview","Sort")
Dave
Re: ListviewColumn Sortable="0"
Answering myself here. I found that the issue above is not a bug, and that is the desired behaviour of ClickColumn.
What I was looking for was the listview.TitleClick that seem to do what I was looking for.
But for some reason changing from using ClickColumn to use TitleClick makes the sorting not work at all.
- airsoftsoftwair
- Posts: 5443
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
Re: ListviewColumn Sortable="0"
All those issues should be fixed by those changes in RapaGUI 2.0:
Code: Select all
- Change: The "Sorted" special position identifier for Listview.Insert() is obsolete now; when a listview
has a column that is used for sorting, all new entries are automatically sort-inserted and the insert
position is ignored; also, Listview.Move() and Listview.Exchange() can no longer be used for listviews
that have a sorting column because the order of elements in a listview that has sorting activated is
solely determined by the sort order and items cannot be positioned at arbitrary indices
- New: Added Listviewcolumn.SortOrder [ISGN] attribute; this can be used to set the sorting order of a
listview column; it can be set to either "Ascending" (the default) or "Descending"; furthermore, you can
also listen to this attribute to get notified when the user changes the sorting order by clicking a
listview column's header
- New: Added Listview.SortColumn [ISGN] attribute; this attribute allows you to set which column should be
the current sorting column; users can also click on the listview's header to change the current sorting
column in which case you'll be notified in case you are listening to Listview.SortColumn
- Change: Listviewcolumn.Sortable is no longer restricted to just a single column; you can set it to TRUE
for as many columns as you wish