PDA

View Full Version : grid doesn't send any request



kalan
26 Nov 2010, 4:40 AM
hi,



WebMax.EditGrid.PositionsEditGrid = Ext.extend(Ext.grid.EditorGridPanel, {
title: '?????????? ??????????',
store: new Ext.data.JsonStore({
root: 'data',
totalProperty: 'total',
messageProperty: 'message'
idProperty: 'PositionId',
fields: ['PositionId', 'Name'],
sortInfo: { field: 'Name', direction: 'ASC' },
proxy: new Ext.data.HttpProxy({ url: '/API/Positions', method: 'POST' })
}),
initComponent: function () {
this.viewConfig = {
forceFit: true
};
this.columns = [
{
xtype: 'gridcolumn',
dataIndex: 'Name',
header: '?????????',
sortable: true,
tooltip: '?????????',
editor: {
xtype: 'textfield'
}
}
];
WebMax.EditGrid.PositionsEditGrid.superclass.initComponent.call(this);
}
});

Ext.onReady(function () {
Ext.QuickTips.init();

var viewPort = new Ext.Viewport({
layout: 'fit',
items: new WebMax.EditGrid.PositionsEditGrid({
border: false
})
});
});



This shows the grid, but it has no data. It even doesn't produce any requests to the server. What's wrong?

StuartAshworth
26 Nov 2010, 5:58 AM
You're not loading the store. Add autoLoad: true or call the load() method somewhere in your code.

kalan
26 Nov 2010, 6:03 AM
oh, really. My bad. Thank you.