PDA

View Full Version : Ext.grid.RowNumberer() in server-side



boston-george
9 Jun 2011, 3:08 AM
Hi guys,

i've create my grid in php-side:




$grid =

array('xtype'=>'editorgrid',


'title'=>'Griglia Dinamica',


'flex'=>1,


'columns'=>array(array('xtype'=>'gridcolumn',

'dataIndex'=>'col1',

'header'=>'Colonna1',
'sortable'=>true,
'width'=>150,
'align'=>'left',
'id'=>'clmCol1'),
array('xtype'=>'gridcolumn',
'dataIndex'=>'col2',
'header'=>'Colonna2',
'sortable'=>true,
'width'=>150,
'align'=>'left',
'id'=>'clmCol2')));












$store = array('storeId'=>'strGrid',


'root'=>'rootGrid',


'autoLoad'=>true,

'url'=>'/dynamicGrid/public/index/populate',

'totalProperty'=>'totalGrid',
'fields'=>array(array('name'=>'col1'),
array('name'=>'col2'),









array('name'=>'col3')));




and in javascript-side i add this grid inside a panel:




Ext.getCmp('pnlCenter').add({





xtype: dynamicGrid.xtype,


title: dynamicGrid.title,


flex: dynamicGrid.flex,

columns: dynamicGrid.columns,

store : new Ext.data.JsonStore({
storeId: storeGrid.storeId,
root: storeGrid.root,
autoLoad: storeGrid.autoLoad,
url: storeGrid.url,
totalProperty: storeGrid.totalProperty,
fields: storeGrid.fields
})
});











now, how can i add as first column, Ext.grid.RowNumberer() ???
Can i do it in php-side??


thanks!