Here is the image of my partial view grid where its paging is not working. same grid is working on View...
Here is the code for Grid:
@Html.Grid(Model).Named("UserListData").Columns(x =>
{
x.Add(y => y.Name);
x.Add().Encoded(false).Sanitized(false).SetWidth(20).RenderValueAs(y => Html.Raw("<a href='#' onclick="loadPartial('"+y.Login+ "')" class = 'glyphicon glyphicon-eye-open'></a>"));
//ActionLink(" ", null, new { mnemonic = y.Login }, new { @class = "glyphicon glyphicon-eye-open", @onclick = "loadPartial('" + y.Login + "')" })
}).Sortable(true).WithPaging(5).WithMultipleFilters()
I also added JS and CSS to bundles file.
` bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery.mobile-{version}.js",
"~/Scripts/jquery-ui-1.12.1.js",
"~/Scripts/bootstrap.js",
"~/Scripts/gridmvc.js",
"~/Scripts/bootbox.js",
"~/Scripts/gridmvc.lang.ru.js"));
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.css",
"~/Content/site.css",
"~/Content/SearchBar.css",
"~/css/SearchTab.css",
"~/css/LoadingBar.css",
"~/Content/CustomStyle.css",
"~/Content/CustomControls.css",
"~/Content/ApplicationStyle.css",
"~/css/Checkbox.css", "~/Content/themes/base/jquery-ui.css",
"~/css/Gridmvc.css"
).Include("~/Content/font-awesome-4.7.0/css/font-awesome.css", new CssRewriteUrlTransform()));
`
Can somebody please let me know if I am missing something... Thanks in advance.
question from:
https://stackoverflow.com/questions/65836831/html-grid-paging-is-not-working-on-partial-view-in-mvc 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…