PDA

View Full Version : ExtJS 3.1: Sorting templatecolumn columns in a grid



nmandya
28 Feb 2012, 9:17 PM
Hi,
I have a grid where a few columns are of the type templatecolumn and some are regular columns. "sortable" is set to true for all columns. However, I am unable to sort on columns of type "templatecolumn", whereas sorting on the other columns works fine. The grid's store uses local sorting. I have set a "dataindex" field for the templatecolumns as well.

Does anybody know how I can turn on sorting on the templatecolumn columns as well? Thanks
--
Regards,
Nagaraj

mitchellsimoens
29 Feb 2012, 7:43 AM
On the Array grid example, this is allowing sorting for me:


{
xtype : 'templatecolumn',
tpl : '{pctChange}%',
dataIndex : 'pctChange',
header : '% Change',
sortable : true
},

mitchellsimoens
29 Feb 2012, 7:43 AM
I also moved this to the appropriate forum.