функция создания
GetProductsGetStore: function(fiels) {
var ret = Ext.create('Ext.data.Store', {
autoLoad: false,
proxy: {
type: 'ajax',
url: '/index.php/ajax/ProductsGet',
reader: {
type: 'json'
},
extraParams: {
currency: '0'
}
},
fields: fiels
});
return ret;
}
и сетка без хранилища
this.Product = Ext.create('Ext.grid.Panel', {
width: '100%',
height: 154,
border: 0,
multiSelect: true,
allowDeselect: true,
columns: [
{
text: 'article',
dataIndex: 'article',
flex: 2
},
{
text: 'name',
dataIndex: 'name',
flex: 2
},
{
text: 'price',
dataIndex: 'price',
flex: 1
}
]
});
сетка динамического редактирования
var fields = [
'id',
'name',
'checked',
'price',
'currency',
'src'
];
this.Product.reconfigure(th.GetProductsGetStore(fields));
this.Product.store.load();