PDA

View Full Version : Default grid sort not work



neosky
26 Jun 2015, 3:18 AM
Hello i am make new grid in window, but i am can't sort data in grid, in header, i am click sorting but nothing happens.In other grid all work right,

this grid where sort not work:

Ext.define('TPL.view.book.price', {
extend: 'Ext.grid.Panel',
alias : 'widget.bookPrice',
title : 'Price for book',
name: 'empList',
config: {
bookId: null
},
header: false,
stripeRows: true,
requires: [
'Ext.ux.grid.FiltersFeature'
],
sortable:true,
features: [ {
ftype: 'filtersex',
encode: false,
local: true,
menuFilterText: 'Filters'
}],
initComponent: function() {
var theStore = Ext.create('TPL.store.BookPrice');
theStore.on('afterrender', function() {
this.getProxy().extraParams.employee = that.bookId;
}, theStore);
this.columns = [
{header: 'id', dataIndex: 'id', flex: 1, },
{header: 'price', dataIndex: 'price_col', flex: 1},
]
}
];
this.callParent(arguments); }});

jdkhamba
26 Jun 2015, 7:33 AM
Looks like you havent bound your store to the grid.Do it like this :


this.store = Ext.create('TPL.store.BookPrice');

And then attach the required events on it.