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