MVC JQgrid未显示在网页上

时间:2018-08-13 09:19:47

标签: c# model-view-controller jqgrid

查看代码

///从ny get manager下载的jquery.jqgrid插件

@{
    ViewBag.Title = "Index";
}

<head>
    <link href="~/content/styles/ui.jqgrid.css" rel="stylesheet" />
    <script src="~/scripts/jqgrid/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="~/scripts/jqgrid/jquery.jqgrid.min.js" type="text/javascript"></script>
    <script src="~/scripts/jqgrid/jquery.jqgrid.src.js" type="text/javascript"></script>
    <script src="~/scripts/jqgrid/grid.locale-en.js" type="text/javascript"></script>

    <script type="text/javascript">
$(document).ready(function () {$("#tblJQGrid").jqGrid(
{url: '',
datatype: "json",
mtype: 'GET',
colNames: ['Id', 'Name', 'Address', 'PhoneNumber', 'Active'],
colModel: [
{ name: 'EmloyeeId', index: 'EmloyeeId', width: 20, stype: 'text' },
{ name: 'EmployeeName', index: 'FName', width: 150 },
{ name: 'Address', index: 'Address', width: 150, sortable: false },
{ name: 'PhoneNumber', index: 'PhoneNumber', width: 80, align: "right" },
{ name: 'Active', index: 'Active', width: 80, align: "right" },],rowNum: 10,
sortname: 'EmloyeeId',
viewrecords: true,
sortorder: "desc",
caption: "List Employee Details",
scrollOffset: 0});
});
    </script> 
</head>
<body>
    <h2>Index</h2>
    <div class="wrapper">
        <div class="container">
            <div class="content">
                <table id="tblJQGrid"></table>
            </div>
        </div>
    </div>
</body>

我已经从https://www.codeproject.com/Articles/771767/JqGrid-In-MVC-Basics那里获得了这段代码。 网格在我的页面上不可见

0 个答案:

没有答案