01.手把手教你 .Net EasyUI DataGrid(创建数据表格)

        这是我的第一篇CSND博客文章,最近一直在学习EasyUI,这个插件官方的教程是基于PHP的后台,而我是学习.NET的,所以希望通过自己的整理与与汇总能够帮助到,.Net的想使用EasyUI的人!

       准备工具:
               1.jQuery EasyUI 1.4.5版本离线教程
               2.jQuery EasyUI 1.4.5插件


下面是通过JQuery的方式添加一个DataGrid的步骤:
         (1)新建一个webfrom窗体,添加jQuery EasyUI的相关引用,用JQuery的方式添加DataGrid

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataGridLoadDataFormSql.aspx.cs" Inherits="web.Test.DataGridLoadDataFormSql" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <script src="../js/jquery-1.7.1.min.js"></script>
    <script src="../EasyUI/jquery.min.js"></script>
    <script src="../EasyUI/jquery.easyui.min.js"></script>
    <link href="../EasyUI/themes/icon.css" rel="stylesheet" />
    <script src="../EasyUI/locale/easyui-lang-zh_CN.js"></script>
    <link href="../EasyUI/themes/default/easyui.css" rel="stylesheet" />
    <script type="text/javascript">
        $(function () {
            $('#tb1').datagrid({
                url:'../Test/GetDataFormSql.ashx',
                width: 400,
                title: '设备管理',
                method:'get',
                columns: [[
                    { field: 'numID', title: '设备编号', width: 150 },
                    { field: '型号', title: '型号', width: 150 },
                    { field: '单价', title: '价格', width: 100 }
                ]],
                pagination: true,
                pageSize:5,
                pageList:[5,10,15]
            })
        })
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table id="tb1"></table>
    &
  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值