PDA

View Full Version : Remote sort



Bunneh
10 Aug 2011, 2:17 AM
Here is my store configuration:

Uhrm.store.PersonalCardFilter =
{
url: '/workers',
totalProperty: 'totalCount',
root: 'workers',
remoteSort: true,

fields: [
{ name: 'familyName', mapping: 'PRL_NAME' },
{ name: 'firstName', mapping: 'PRF_NAME' },
{ name: 'cardNumber', mapping: 'PM_CARDNO' }]
};
Here is my grid configuration:


{
xtype: 'grid',
store: store,
loadMask: true,
border: false,

viewConfig:
{
forceFit: true
},

columns: [
{
header: '??\'?',
dataIndex: 'firstName',
sortable: true
},
{
header: '????????',
dataIndex: 'familyName',
sortable: true
},
{
header: '????? ??????',
dataIndex: 'cardNumber',
sortable: true
}],

bbar:
{
xtype: 'paging',
store: store,
pageSize: 50,
displayInfo: true
}
}
If I click on the '??\'?' header, the post package would contain firstName as sort parameter instead of PRF_NAME. Why it's not smart enough to use mapping? If there is no simple way to force it use mapping then the whole mapping feature becomes useless... :(