// 組視圖
var groupingView = new Ext.grid.GroupingView({
// groupTextTpl : '{text} ({[values.rs.length]}
// {[values.rs.length > 1 ? "Items" : "Item"]})',//
// 強制(width)填充
forceFit : true,
// 是否在首部Group位置顯示列名
showGroupName : false,
// 是否在列菜單中顯示"show in group"選擇(功能:是否以組方式顯示)
enableNoGroups : true,
// 是否在列菜單中顯示"groupBy this
// Field"選擇(功能:更換分組字段排版)
enableGroupingMenu : false,
// 是否在列中隱藏分段的字段頭(列頭)
hideGroupedColumn : true
});
store : new Ext.data.GroupingStore({
reader : new Ext.data.JsonReader({
fields : ['project', 'img',
'title', 'responsedate']
}),
// 本地數據加載
data : [{
id : 1,
project : '重要消息',
img : "<image src='image/tool/coins.png' />",
title : '功能完善中1...',
responsedate : "2009-01-01"
}, {
id : 2,
project : '普通消息',
img : "<image src='image/tool/color_wheel.png' />",
title : '功能完善中2...',
responsedate : "2009-01-01"
}],
sortInfo : {
field : 'project',
direction : 'DESC'// 降序'ASC':升序
},
// 組存在的情況下,是否按組排序(默認為false,否)
groupOnSort : true,
groupField : 'project'
})
},
posted on 2010-04-01 15:58
紫蝶∏飛揚↗ 閱讀(3846)
評論(0) 編輯 收藏 所屬分類:
EXTJS