PDA

View Full Version : not able to make LiveGrid editable



vibhor_msat
27 Aug 2012, 8:49 PM
Hi Guys,
I have implemented a livegrid which is working fine. Now i am trying to make it editorGridPanel.
But somehow the code is not working. Please help as i am new to ExtJS.....

code is posted below


var mystore = new Ext.ux.grid.livegrid.Store({
// autoLoad : true,
url : GLOBALCONTEXTPATH+'/conflictContrlr/getDataForLiveGrid.do',
bufferSize : 40,
reader : new Ext.ux.grid.livegrid.JsonReader({
id: '_id',
root: 'data',
totalProperty: 'totalCount',
successProperty: 'success',
messageProperty : 'message',

versionProperty : 'version'
}, [ {
name : 'c1', type:'string'
},{
name : 'c2', type:'string'
},{
name : 'c3', type:'string'
},{
name : 'c4', type:'string'
},{
name : 'c5', type:'string'
},{
name : 'c6', type:'string'
}]),
sortInfo : {field: 'c1', direction: 'ASC'}
});


var myView1 = new Ext.ux.grid.livegrid.GridView({
loadMask : {
nearLimit : 35,
msg : 'Buffering. Please wait...'
}
});

var livegrid = new Ext.ux.grid.livegrid.EditorGridPanel({
stripeRows : true,
columnLines : true,
enableDragDrop : false,
cm : new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer({header : 'S.No.',width : 40}),
{header: "Conflict Id", align : 'center', width: 100, dataIndex: 'c1'},
{header: "Conflict Party Id", align : 'center', width: 120, dataIndex: 'c2',editable : true},
{header: "Conflict Start Date", align : 'center', width: 130, dataIndex: 'c3'},
{header: "Conflict End Date", align : 'center', width: 130, dataIndex: 'c4'},
{header: "CGA Id", align : 'center', width: 100, dataIndex: 'c5'},
{header: "SAV Id", align : 'center', width: 100, dataIndex: 'c6'},
]),
loadMask : {
msg : 'Loading...'
},
// height : 150,
title : 'Conflict Search Results',
stripeRows : true,
// width : 600,
store : mystore,
selModel : new Ext.ux.grid.livegrid.RowSelectionModel(),
view : myView1,
bbar : new Ext.ux.grid.livegrid.Toolbar({
view : myView1,
displayInfo : true
})
});





using ExtJS version 3.4.:)

Zdeno
28 Aug 2012, 12:07 PM
Start with examples: http://dev.sencha.com/deploy/ext-3.4.0/examples/# rather http://dev.sencha.com/deploy/ext-3.4.0/examples/grid/edit-grid.js

As I see you dont have defined editor into your columns.

vibhor_msat
28 Aug 2012, 9:37 PM
:((silly mistake.....
Thanks a lot Zdeno:):):):):)

vibhor_msat
2 Sep 2012, 10:15 PM
Hi Guys,
I am trying to catch the store events(like 'load', 'beforeload','exception') in Ext.ux.grid.livegrid.Store
but i am not able to catch them i.e. code inside the listeners are not getting executed when i scroll the scrollbar and new data is loaded in store from server.

please suggest something guys...:)