日期:2014-05-16 浏览次数:20776 次
var EquInfoStore;
EquInfoManage = function (node) {
//分页每页显示数量
var pageSize = 12;
//指定列参数
var fields = ["equid", "equname", "equteachername", "equdate", "equtime", "equaddress"];
EquInfoStore = new Ext.data.Store({
proxy: new Ext.data.HttpProxy(
{
url: "DATA/EquInfo/EquInfo.aspx",
method: "POST"
}),
reader: new Ext.data.JsonReader(
{
fields: fields,
root: "data",
id: "equid",
totalProperty: "totalCount"
})
});
//加载参数
EquInfoStore.load({ params: { start: 0, limit: pageSize } });
//--------------------------------------------------列选择模式
var sm = new Ext.grid.CheckboxSelectionModel({
dataIndex: "equid"
});
//--------------------------------------------------列头
var cm = new Ext.grid.ColumnModel([
sm, {
header: "课程ID",
dataIndex: "equid",
tooltip: "课程唯一标识",
//可以进行排序
sortable: true
}, {
header: "课程名称",
tooltip: "课程名称",
width: 130,
dataIndex: "equname",
sortable: true,
renderer: function (value) {
return "<b>" + value + "</b>";
}
}, {
header: "指导老师",
tooltip: "老师姓名",
//dataIndex: "guestname",equteachername
dataIndex: "equteachername",
sortable: true,
renderer: function (value) {
return "<font color=#EE9572>" + value + "</font>";
}
}, {
header: "实验日期",
tooltip: "实验日期",
//dataIndex:&nbs