多列排序演示,指定点击标题可设定初次排序方式。
This commit is contained in:
@@ -178,7 +178,6 @@ $('#dataGrid').dataGrid({
|
|||||||
frozenCols: true, // 启用冻结列,并在colModel中设置frozen:true
|
frozenCols: true, // 启用冻结列,并在colModel中设置frozen:true
|
||||||
showRownum: true, // 是否显示行号,默认true
|
showRownum: true, // 是否显示行号,默认true
|
||||||
showFooter: true, // 是否显示底部合计行,数据载入详见 ajaxSuccess
|
showFooter: true, // 是否显示底部合计行,数据载入详见 ajaxSuccess
|
||||||
multiSort: true, // 是否支持多列排序
|
|
||||||
|
|
||||||
// ================ 设置多级表头 BEGIN ==============
|
// ================ 设置多级表头 BEGIN ==============
|
||||||
// 设置多级表头
|
// 设置多级表头
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ $('#dataGrid').dataGrid({
|
|||||||
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
{header:'${text("状态")}', name:'status', index:'a.status', width:150, align:"center", formatter: function(val, obj, row, act){
|
||||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||||
}},
|
}},
|
||||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', firstsortorder:'desc', width:150, align:"center"},
|
||||||
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
{header:'${text("备注信息")}', name:'remarks', index:'a.remarks', width:150, align:"left"},
|
||||||
{header:'${text("操作")}', name:'actions', width:200, sortable:false, title:false, formatter: function(val, obj, row, act){
|
{header:'${text("操作")}', name:'actions', width:200, sortable:false, title:false, formatter: function(val, obj, row, act){
|
||||||
var actions = [];
|
var actions = [];
|
||||||
@@ -198,8 +198,8 @@ $('#dataGrid').dataGrid({
|
|||||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
return js.getDictLabel(${@DictUtils.getDictListJson('sys_menu_type')}, val, '${text("未知")}', true);
|
||||||
}},
|
}},
|
||||||
{header:'${text("日期时间")}', name:'testDatetime', width:150, align:"center"},
|
{header:'${text("日期时间")}', name:'testDatetime', width:150, align:"center"},
|
||||||
{header:'${text("用户名称")}', name:'testUser.userName', width:150, align:"center"},
|
{header:'${text("用户名称")}', name:'testUser.userName', sortable:false, width:150, align:"center"},
|
||||||
{header:'${text("机构名称")}', name:'testOffice.officeName', width:150, align:"center"},
|
{header:'${text("机构名称")}', name:'testOffice.officeName', sortable:false, width:150, align:"center"},
|
||||||
{header:'${text("区域名称")}', name:'testAreaName', width:150, align:"center"}
|
{header:'${text("区域名称")}', name:'testAreaName', width:150, align:"center"}
|
||||||
],
|
],
|
||||||
// 加载成功后执行事件
|
// 加载成功后执行事件
|
||||||
@@ -209,6 +209,8 @@ $('#dataGrid').dataGrid({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
multiSort: true, // 是否支持多列排序,给列指定 firstsortorder 可设定初次排序方式
|
||||||
|
|
||||||
// 加载成功后执行事件
|
// 加载成功后执行事件
|
||||||
ajaxSuccess: function(data){
|
ajaxSuccess: function(data){
|
||||||
// if (data.count == 0){
|
// if (data.count == 0){
|
||||||
|
|||||||
Reference in New Issue
Block a user