Reputation: 158
I've gor problem with RemoteSorting when im trying to turn it on then sorting do working at all. When I'm don't turining it on then I can sort but only in display data in grid not all data from base.
Anyone see there any problem ? Please help its important
var contact = Ext.data.Record.create([
{name: 'ID', mapping: 'ID'},
{name: 'Name', mapping: 'Name'},
{name: 'LastName', mapping: 'LastName'}
])
var store = new Ext.data.Store({
remoteSort: true,
proxy: new Ext.data.HttpProxy({
url: '../../Users/Info',
dataType: 'json',
method: 'GET',
headers: { "Content-Type": "application/json; charset=utf-8" }
}),
reader: new Ext.data.JsonReader({
root: 'data',
dataType: 'json',
idProperty: 'prodID',
totalProperty: 'totalCount'
},
ProductsType
),
writer: new Ext.data.JsonWriter({
encode: false,
listful: true,
writeAllFields: true
})
});
})
Upvotes: 1
Views: 404
Reputation: 3114
With remote sorting turned on, you delegate all sorting responsibilities to the server-side app that is controlling the return of data to your grid. This is an important point to understand, since the grid's store knows literally nothing about the sorting state when remoteSort is turned on.
So if you want remote sorting, you'll have to be sure to handle the sorting on the asp.net side. Typically, this will be done via the SQL query you're using.
Upvotes: 1