NonFactors.Grid.Mvc6 click not fires

拥有回忆 提交于 2021-02-11 15:30:15

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/55793518/nonfactors-grid-mvc6-click-not-fires

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!