NonFactors.Grid.Mvc6单击不触发 [英] NonFactors.Grid.Mvc6 click not fires
问题描述
我正在尝试在我的简单ASP.NET Core 2.2应用程序中实现分页.我执行了 Install-Package NonFactors.Grid.Mvc6
命令来安装软件包,并按照
然后将网格样式表和网格脚本包含到_Layout.cshtml中,如下所示:
< environment include ="Development">< link rel ="stylesheet" href =〜/lib/bootstrap/dist/css/bootstrap.css"/>< link rel ="stylesheet" href =〜/css/site.css"/>< link href =〜/Content/MvcGrid/mvc-grid.css" rel ="stylesheet"></环境>< environment include =开发">< script src =〜/lib/jquery/dist/jquery.js"></script>< script src =〜/lib/bootstrap/dist/js/bootstrap.js"></script>< script src =〜/js/MvcGrid/mvc-grid.js"></script>< script>[] .forEach.call(document.getElementsByClassName('mvc-grid'),函数(元素){新的MvcGrid(element);});</script>< script src =〜/js/site.js" asp-append-version ="true"></script></环境>
I am attempting to implement paging in my simple ASP.NET Core 2.2 application.
I executed the command Install-Package NonFactors.Grid.Mvc6
to install the package and followed all the installation steps described in this page.
I can see the data displayed in grid but when I click to show the next records the paging in not moving to show the other records.
I am missing any scripts?
I made the test followed the tutorial that you provided , but it worked well. Make sure your styles and scripts are saved as follows:
Then include grid styling sheet and grid scripts to _Layout.cshtml like below:
<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
<link href="~/Content/MvcGrid/mvc-grid.css" rel="stylesheet">
</environment>
<environment include="Development">
<script src="~/lib/jquery/dist/jquery.js"></script>
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
<script src="~/js/MvcGrid/mvc-grid.js"></script>
<script>
[].forEach.call(document.getElementsByClassName('mvc-grid'), function (element) {
new MvcGrid(element);
});
</script>
<script src="~/js/site.js" asp-append-version="true"></script>
</environment>
这篇关于NonFactors.Grid.Mvc6单击不触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!