六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 170|回复: 0

ExtJs TreeGrid实例

[复制链接]

升级  55.33%

35

主题

35

主题

35

主题

秀才

Rank: 2

积分
133
 楼主| 发表于 2013-2-8 00:12:52 | 显示全部楼层 |阅读模式
var searchRstGridPanel = new Ext.grid.GridPanel ({ store: new Ext.data.Store({                 proxy: new Ext.data.HttpProxy({            url: searchNodeFromLuceneDataUrl        }),  // 必须是 HttpProxy                reader:new Ext.data.JsonReader({        totalProperty: 'totalCount',       idProperty:'nodeId',       root:'data',       remoteSort: true,              fields: [            'nodeId','nodeName', 'nodeType', 'path'                   ]        })    }),    colModel: new Ext.grid.ColumnModel({        defaults: {            width: 120,            sortable: true        },        columns: [            {id: 'nodeId', header: '序号', width: 200, sortable: true, dataIndex: 'nodeId'},            {header: '节点类型', dataIndex: 'nodeType'},            {header: '节点名称', dataIndex: 'nodeName'},            {header: '路径', dataIndex: 'path'}        ]    }),    viewConfig: {        forceFit: true,//      Return CSS class to apply to rows depending upon data values        getRowClass: function(record, index) {                   }    },    anchor:'100% 300',    frame: true,    border:false,    iconCls: 'icon-grid'});
json字符串:
{success:true,'totalCount':'2',data:[{'nodeId':'2c9090652fb50c67012fb51609720002','nodeType':'nd:base','nodeName':'电视剧','path':'mas'},{'nodeId':'2c9090652fb50c67012fb51a64070005','nodeType':'nd:vod','nodeName':'come','path':'mas/mas'}]}
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表