zoukankan      html  css  js  c++  java
  • daragrid 简单认识

    @{
        ViewBag.Title = "EasyUI";
        Layout = null;
    }
    <script src="~/jquery-easyui-1.5.5.2/jquery.min.js"></script>
    <script src="~/jquery-easyui-1.5.5.2/jquery.easyui.min.js"></script>
    <script src="~/jquery-easyui-1.5.5.2/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/jquery-easyui-1.5.5.2/themes/default/easyui.css" rel="stylesheet" />
    <link href="~/jquery-easyui-1.5.5.2/themes/icon.css" rel="stylesheet" />
    <h2>EasyUI</h2>
    <div>
        <!--DataGrid-->
        <div style="margin:20px">
            <table class="easyui-datagrid" fitColumns="true"  rownumbers="true" singleSelect="true" title="第一个Datagrid" style="300px;height:auto">
                <thead>
                    <tr>
                        <th align="center" width="100px" data-options="field:'Name'">姓名</th>
                        <th align="center" width="100px" data-options="field:'Age'">年龄</th>
                        <th align="center" width="100px" data-options="field:'Work'">工作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>张三</td>
                        <td>11</td>
                        <td>C#</td>
                    </tr>
                    <tr>
                        <td>李四</td>
                        <td>11</td>
                        <td>java</td>
                    </tr>
                    <tr>
                        <td>王五</td>
                        <td>11</td>
                        <td>php</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    

    第二种写法(js):

    $('#dg').datagrid({   
        url:'datagrid_data.json',   
        columns:[[   
            {field:'code',title:'Code',100},   
            {field:'name',title:'Name',100},   
            {field:'price',title:'Price',100,align:'right'}   
        ]]   
    });  

      

  • 相关阅读:
    1-7周成绩总结
    1-6周成绩总结
    第七周学习笔记
    前五周测验成绩总结
    第六周学习笔记
    第五周学习笔记
    2018-2019-2 20189206 Python3学习
    2018-2019-2 20189206 安全工具的学习
    2018-2019-2 20189206 《网络攻防实践》 第一周作业
    2018-2019-1 20189206 《Linux内核原理与分析》第九周作业
  • 原文地址:https://www.cnblogs.com/hnzheng/p/9183019.html
Copyright © 2011-2022 走看看