PDA

View Full Version : help in adding locking/filtering into json configured grid



calebos
11 Feb 2010, 12:41 AM
Hey

I wanted to add locking and filtering to my grid but examples dont work very well with my current approach. I have a single grid which i configure over metadata. Can you hint me how to add these functionality to this grid :


var xgrid = new Ext.grid.GridPanel({
tbar:filter,
hideMode: 'offsets',
title:'Widok raportu',
rowNumberer: true,
id:'main-panel',
store:store,
loadMask:gridMask,
bbar:pagingBar,
defaults:{width:140,sortable:true},
columns:[],
viewConfig: {
onDataChange: function(){
this.cm.setConfig(this.ds.reader.jsonData.columns);
this.syncFocusEl(0);
}

}

});

server returns something like this :


{
"total":"323",
"root":[..REMOVED INTENTIONALLY..]
,
"metaData":
{
fields: [..REMOVED INTENTIONALLY..],
root: "root",
totalProperty:"total",
remoteSort:true,
params:{..REMOVED INTENTIONALLY..}

}
,"columns":[{..REMOVED INTENTIONALLY..}]
}