日期:2014-05-16 浏览次数:20860 次
        Ext.Ajax.request({
            url:'grid.do?method=GridMove',
            method: 'POST',
            success:function(action,response){
                var strdata = action.responseText;
                [color=#FF0000]var json = Ext.decode(strdata);[/color]                   var ds =  new Ext.data.Store({
                               url:'grid.do?method=GridMove',
                            reader : new Ext.data.JsonReader({
                                        root : 'root',totalProperty: 'count'
                                    }, ['address','name'])
                        });
                var _report_CM1 = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer({
                        header : '行号',
                        width : 35
                                }), {
                            header : '单位',
                            dataIndex : 'name',
                            width : 80
                        }, {
                            header : '姓名',
                            dataIndex : 'address',
                            width : 80
                        }]);
               _report_GRID.reconfigure(ds,_report_CM1);  //重新配置数据集和列模型
              [color=#FF0000] ds.loadData(json);[/color]  //加载数据
              
            }
        });
------解决方案--------------------
好像有个readerFunction方法把 你可以些个方法进行过滤的
------解决方案--------------------
对,可以设置隐藏列的方法,这是个好的方法
------解决方案--------------------
顶你。。
------解决方案--------------------
ColumnModel cm = grid.getColumnModel();
隐藏:
cm.setHidden( 列索引, true);
显示:
cm.setHidden( 列索引, false);