View Full Version : CheckboxSelectionModel and sort by its checked records

24 Jun 2011, 4:12 AM
Is there any possibility to sort an grid which is using a CheckboxSelectionModel by its selected (checked) items?
I want to display the checked records on the top the grid! All unchecked records should follow the checked items. I didn't find a proper solution to realize that, because sorting seems to work only with record's fields but the check marker is no field of the record. :-?
I'm using ExtJS 3.3.1.

24 Jun 2011, 6:34 AM
There may be a better way but you could have a dummy field in the store that holds the value of the checkbox. Using listeners on the selection model it should be possible to keep the field value correct, setting it using the record's set() method.

29 Jun 2011, 1:40 AM
Okay I'm going to try to do it in this way...
But sounds complicate for a simple task 8-|