function find() {
var ajlb = $("#ajlb").val();
var ndh = $("#ndh").val();
var ajzh = $("#ajzh").val();
wjaStore.load({ params: {
ajlb: ajlb,
ndh: ndh,
ajzh: ajzh
}
});
function AjGrid() {
wjaStore = Ext.create('Ext.data.Store', {
id: 'wjaStore',
fields: ['id', 'name', 'age'],
pageSize: 25,
remoteSort: false,
proxy: {
type: 'ajax',
url: '/Finder/GetAjList',
reader: {
type: 'json',
root:"rows",
totalProperty: "results"
}
}
}); wjaGrid = Ext.create('Ext.grid.Panel', {
store: wjaStore,
renderTo: Ext.getBody(),
columns: [{
text: '序号',
sortable: false,
dataIndex: 'id',
align: "center"
}, {
text: '姓名',
sortable: false,
dataIndex: 'name',
align: "center"
}, {
text: '年龄',
sortable: false,
align: "center",
dataIndex: 'age'
}],
bbar: Ext.create("Ext.PagingToolbar", {
store: wjaStore,
displayInfo: true,
displayMsg: "显示 {0} - {1} 条 共 {2}",
emptyMsg: "无满足条件的记录"
})
});
我用Ext.grid.Panel写了个小程序,该程序主要功能是根据条件查找,然后通过ext.grid.Panel显示出来.
find函数绑定在一个按钮上,点击该按钮程序可以工作,并得到结果,显示在grid中,
现在问题是如果我点击grid下的指向右侧的小三角(即下一顼按钮)时,不能将查询条件传到服务器上,
这样可以想到是grid没有传参数,所以应该在grid中加上传参的功能,
现在我不知道该怎么通过grid向服务器传参数,查了一些资料,没有找到解决方法,帮助文档也没看明白,
不知道谁用过这个,或都见过这样的例子,请指教一下.
var ajlb = $("#ajlb").val();
var ndh = $("#ndh").val();
var ajzh = $("#ajzh").val();
wjaStore.load({ params: {
ajlb: ajlb,
ndh: ndh,
ajzh: ajzh
}
});
function AjGrid() {
wjaStore = Ext.create('Ext.data.Store', {
id: 'wjaStore',
fields: ['id', 'name', 'age'],
pageSize: 25,
remoteSort: false,
proxy: {
type: 'ajax',
url: '/Finder/GetAjList',
reader: {
type: 'json',
root:"rows",
totalProperty: "results"
}
}
}); wjaGrid = Ext.create('Ext.grid.Panel', {
store: wjaStore,
renderTo: Ext.getBody(),
columns: [{
text: '序号',
sortable: false,
dataIndex: 'id',
align: "center"
}, {
text: '姓名',
sortable: false,
dataIndex: 'name',
align: "center"
}, {
text: '年龄',
sortable: false,
align: "center",
dataIndex: 'age'
}],
bbar: Ext.create("Ext.PagingToolbar", {
store: wjaStore,
displayInfo: true,
displayMsg: "显示 {0} - {1} 条 共 {2}",
emptyMsg: "无满足条件的记录"
})
});
我用Ext.grid.Panel写了个小程序,该程序主要功能是根据条件查找,然后通过ext.grid.Panel显示出来.
find函数绑定在一个按钮上,点击该按钮程序可以工作,并得到结果,显示在grid中,
现在问题是如果我点击grid下的指向右侧的小三角(即下一顼按钮)时,不能将查询条件传到服务器上,
这样可以想到是grid没有传参数,所以应该在grid中加上传参的功能,
现在我不知道该怎么通过grid向服务器传参数,查了一些资料,没有找到解决方法,帮助文档也没看明白,
不知道谁用过这个,或都见过这样的例子,请指教一下.
wjaStore = Ext.create('Ext.data.Store', {
autoLoad : {start : 0 , limit : 25},
id: 'wjaStore',
fields: ['id', 'name', 'age'],
pageSize: 25,
remoteSort: false,
proxy: {
type: 'ajax',
url: '/Finder/GetAjList',
reader: {
type: 'json',
root:"rows",
totalProperty: "results"
}
}
});
autoLoad : {start : 0 , limit : 25},
id: 'wjaStore',
fields: ['id', 'name', 'age'],
pageSize: 25,
remoteSort: false,
proxy: {
type: 'ajax',
url: '/Finder/GetAjList',
reader: {
type: 'json',
root:"rows",
totalProperty: "results"
}
}
});