View Full Version : Multiple sorting grid problem

1 Sep 2011, 2:02 AM
Hi everybody, I am trying to make a sorting based in two columns, DateReceived and AvailableQty, in my case.
The problem is that only the string 'DateReceived' is passed to the server-side, and as you can see it should be '{DateReceived,AvailableQty} '.

I checked the code from the example: http://docs.sencha.com/ext-js/4-0/guides/data/examples/sorting_grouping_filtering_store/index.html
the Json that is passed in the example above is correct and different from the JSON passed by my code, the reason I don't know.

You can check my code bellow:


extend: 'Ext.data.Store',
model: 'IssueInventoryPartGrid.model.IssueInventoryPart',
autoLoad: true
, pageSize: 200
, remoteSort: true ,
sorters: ['DateReceived','AvailableQty']

//MODEL Ext.define('IssueInventoryPartGrid.model.IssueInventoryPart',
{ extend: 'Ext.data.Model'
, fields:
['Id', 'QtyToIssue', 'AvailableQty', 'BatchNumber', 'StockAddressName',
{ name: 'DateReceived', type: 'date', dateFormat: 'MS' }]
, proxy: {
type: 'ajax',
api: {read: 'QuantityInStockEditableList' ,
update: 'IssueQuantity'
, create: 'IssueQuantity'
, extraParams:
total: 50000
,partId: eval(Ext.urlDecode(window.location.search.substring(1)))
, reader:
type: 'json'
, root: 'IssueInventoryParts'
, successProperty: 'success'
, totalProperty: 'total'
, simpleSortMode: true
} });

Best regards,
Tito Morais

1 Sep 2011, 3:22 PM
This is caused by simpleSortMode: true.