I have been doing alot of work on a custom grid, with built in filtering and dynamic columns and buffered scrolling.
Along the way I noticed something that confused me a little about sorting. Whne you sort based on column you can do remote sorting which passes the field name and the direction either ASC or DESC. partners + napier - nuggets:: A new survey from Miller Zell shows instore marketing kicking ads butts. air conditioning costs and to conserve electricity in a grid that hasnt been http://www.partnersandnapier.com/news/nuggets/Page-2.htmlHOME | Server crashes, slow lines frustrate iPhone buyers | The :: The line for the iPhone 3G has proven to be far slower than its speedy predecessor, as Apples iTunes servers failed to stay up to activate the hotly anticipated http://news.cnet.com/8301-17938_105-9988807-1.htmlHOME |
But it is passing the dataIndex field rather than the mapped field. So if I have a record:
var recordmapping = Ext.data.Record.create([
{ name : 'First', mapping: 'RandomFieldFromServerSide1'},
{ name : 'Last', mapping: 'RandomFieldFromServerSide2'},
]);
Then add this to the reader which gets added to the store then declare my columns. Coudal Partners:: This will definitely fit in my office and a pair of shades will hide in London has redesigned its Saturday Review edition and its beautiful, from the grid to http://www.coudal.com/archive.php?cat=cat_industrial_designHOME |
this.columns = [{
id: 'title',
header: "first Name",
dataIndex: 'First',
sortable:true,
width: 250
},{
header: "Last Name",
dataIndex: 'Last',
width: 100,
hidden: false,
sortable:true
}];
Then click to sort, say first name, it will post to the URL whatever that be the parameters sort=First&dir=ASC rather than the mapped field which is what the backend knows about.
So I would think that no matter what it should pass sort=RandomFieldFromServerSide1&dir=ASC
Am I crazy for thinking this is what it should do? or am I doing something wrong?
Challenging Books For A 14 Year Old?
First guitar : acoustic or electric?
|