首页 > 其他 > 详细

EasyUI篇のDataGrid

时间:2015-11-17 18:58:14      阅读:251      评论:0      收藏:0      [点我收藏+]

HTML:

<table id="dg"></table> 或者 <div id="dg"></div>

JS:

$(‘#dg‘).datagrid({
        url: ‘/AdminNewList/GetList‘,
        method: ‘post‘,
        rownumbers: true,
        columns: [[
            { field: ‘ck‘, checkbox: true },
            { field: ‘title‘, title: ‘标题‘, width: 200, align: ‘center‘ },
            { field: ‘author‘, title: ‘作者‘, width: 100, align: ‘center‘ },
            { field: ‘subDateTime‘, title: ‘时间‘, width: 150, align: ‘center‘ },
            { field: ‘msg‘, title: ‘详细‘, width: 400, align: ‘center‘ },
            { field: ‘delete‘, title: ‘删除‘, width: 100, align: ‘center‘ },
            { field: ‘editor‘, title: ‘修改‘, width: 100, align: ‘center‘ }
        ]]
    });

 

注:后台GetList方法,返回的是json字符串

EasyUI篇のDataGrid

原文:http://www.cnblogs.com/dabexiong/p/4972370.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!