ExtJs中GridPanel使用之技巧

 1 var grid = new Ext.grid.GridPanel([{
 2     cm: new Ext.grid.ColumnModel({
 3         header: '',
 4         dataIndex: '',
 5         //设置列显示值
 6         //v:当前列的值
 7         //params:当前列的参数
 8         //record:当前记录集
 9         renderer: function(v, params, record){}
10     }]),
11     view: new Ext.grid.GroupingView({
12         forceFit: true,
13         groupTextTpl: '{text} ([values.rs.length])',
14         //设置行样式
15         //record: 当前纪录集
16         //index: 行索引
17         //rowParams: 行参数
18         //store: 数据集
19         getRowClass: function(record, index, rowParams, store){
20             return 'style class'
21         }
22     })
23 });
posted @ 2009-04-03 18:00  TerryLiang  阅读(1845)  评论(0编辑  收藏  举报