简体   繁体   English

NonFactors.Grid.Mvc6单击不触发

[英]NonFactors.Grid.Mvc6 click not fires

I am attempting to implement paging in my simple ASP.NET Core 2.2 application. 我正在尝试在我的简单ASP.NET Core 2.2应用程序中实现分页。 I executed the command Install-Package NonFactors.Grid.Mvc6 to install the package and followed all the installation steps described in this page. 我执行的命令Install-Package NonFactors.Grid.Mvc6安装的软件包,并遵循描述的所有安装步骤页面。 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: 然后将网格样式表和网格脚本包含到_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>

 <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>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM