vendredi 24 octobre 2014

How to sort a grid column with checkboxes?

Hello all,

I am having a grid with multiple columns. One of the column is a checkbox column of xtype: 'checkcolumn'. I have something around 100 rows in this grid and for some of the rows the checkbox is checked and for some it is unchecked based on a value in the db. All the other columns in the grid which are string based sort correctly in either ascending or descending order when I click on their column headers. But for this particular column, when I click on the header nothing is happening. When I click on the header, I should get all those rows sorted based on like, if the checkbox is selected or not. I should either get those checked values to be on top of the list or at the end of the list.


{

xtype: 'checkcolumn',

header: "Old User",

disabled: true,

disabledCls:'x-item-enabled',

width: 170,

dataIndex: 'oldUser',

itemId: 'oldUser',

renderer: this.checkOldUser,

sortable: true

}


Please let me know what exactly I should be doing to make this sorting work.


Thanks...






How to sort a grid column with checkboxes?

Aucun commentaire:

Enregistrer un commentaire