0

Listbox column sort on virtual model?

asked 2013-11-23 09:20:07 +0800

davout gravatar image davout
1435 3 18

I'm struggling to find a way to implement column sorting on a MVVM listbox which is underpinned by a custom caching paging list model which itself is a wrapper around an underlying data query. The query result set could be quite large, so there's no chance of implementing a 'compare' comparator. All the demo examples seem to be based in memory small arrays.

I've tried adding an 'onSort' event to the listheader tag but nothing happens.

Any suggestions?

delete flag offensive retag edit

Comments

Why not u added Sorting at Query level .I mean Jut select the column in which u want to add sorting and fire query with OrderBy

sjoshi ( 2013-11-25 04:52:52 +0800 )edit

The question is how do I detect a change in sort from a user action on the MVVM listbox? For example, the listbox starts sorted by column 1. The user clicks on the column title of column 2. How do I detect that this user action?

davout ( 2013-11-25 07:43:05 +0800 )edit

Can anybody help me with this????

davout ( 2013-11-26 18:13:52 +0800 )edit

You have to store this into Databse What user Sort Selection and save that selection into DB

sjoshi ( 2013-11-26 18:38:51 +0800 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-11-28 06:56:25 +0800

davout gravatar image davout
1435 3 18

I discovered that I have to implement the 'Sortable' interface with my custom data model.

Also, the 'onSort' event only works if the "sort=auto" attribute is set.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2013-11-23 09:20:07 +0800

Seen: 14 times

Last updated: Nov 28 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More