Opened 15 years ago

Closed 15 years ago

#1810 closed enhancement (invalid)

FilteredTable--sorting on a nondisplayed field

Reported by: guest Owned by: Tom Trenka
Priority: high Milestone: 1.0
Component: Widgets Version: 0.4
Keywords: FilteredTable Store Cc:
Blocked By: Blocking:


Since a Store is behind a FilteredTable?, it would be nice to be able to sort based upon a field in the Store but not displayed as a column. Currently, you can only sort on a displayed column.

In my situation, I am having problems simply inserting rows and keeping the same order they were inserted. I am showing the last 10 files to come through the system and have "nosort" on all columns. I need to keep order and display no columns that will keep the order. With no sort information provided, the list gets jumbled. I could solve the problem by having a sequential integer field in the Store that isn't displayed.

One might wonder why I'm using a FilteredTable? if not for sorting. Well, the Store backend capability provides the dynamic updates needed for my Ajax enabled last 10 files table.

Another solution might be to allow other types of dojo.collections to be used for the Table backend. Maybe in my situation, using a Queue as the table backend would be a better idea. Obviously, this would require a standard interface for all the Collections to implement which may or may not be feasible.


Change History (2)

comment:1 Changed 15 years ago by bill

Milestone: 0.6
Owner: changed from bill to Tom Trenka

comment:2 Changed 15 years ago by Tom Trenka

Resolution: invalid
Status: newclosed

I'm not sure this is something that should be done. As you've noticed, the FilteringTable? is the one doing the sorting, and not the Store...which means the Store itself is unaltered. So addData basically pushes your data on the end of the internal array of objects, which means the actual order should be preserved.

Filtering itself sorts HTMLRow objects, and not the objects in the underlying store.

You might want to simply work directly with Store instead of using the FilteringTable? front end on it...

Note: See TracTickets for help on using tickets.