redalerthan
6 Jun 2007, 6:23 AM
Partial code in grid.js:
var ds = new Ext.data.Store({
// HttpProxy should be used here
proxy: new Ext.data.ScriptTagProxy({url: 'grid-paging-data.php'}),
reader: new Ext.data.JsonReader({root: 'results',totalProperty: 'total'}, [
{name: 'OrderID', mapping: 'OrderID'},
{name: 'ProductID', mapping: 'ProductID'},
{name: 'UnitPrice', mapping: 'UnitPrice'},
{name: 'Quantity', mapping: 'Quantity'},
{name: 'Discount', mapping: 'Discount'}
]),
// turn on remote sorting
remoteSort: true
});
ds.setDefaultSort('OrderID', 'desc');
This is work for the grid, while when I change the proxy to HttpProxy, the grid get no data.
entironment:winxpsp2+iis5+php5+mysql5+ie7, php file and .js file located in the root of wwwroot.
What 's the problem ?
var ds = new Ext.data.Store({
// HttpProxy should be used here
proxy: new Ext.data.ScriptTagProxy({url: 'grid-paging-data.php'}),
reader: new Ext.data.JsonReader({root: 'results',totalProperty: 'total'}, [
{name: 'OrderID', mapping: 'OrderID'},
{name: 'ProductID', mapping: 'ProductID'},
{name: 'UnitPrice', mapping: 'UnitPrice'},
{name: 'Quantity', mapping: 'Quantity'},
{name: 'Discount', mapping: 'Discount'}
]),
// turn on remote sorting
remoteSort: true
});
ds.setDefaultSort('OrderID', 'desc');
This is work for the grid, while when I change the proxy to HttpProxy, the grid get no data.
entironment:winxpsp2+iis5+php5+mysql5+ie7, php file and .js file located in the root of wwwroot.
What 's the problem ?