在进行分页和排序时,网格变得空洞

编程入门 行业动态 更新时间:2024-10-22 11:03:08
本文介绍了在进行分页和排序时,网格变得空洞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在进行分页和排序时,网格变为空,我使用ajaxcall后退功能,但在这里进行分页时返回主页而不是下一页 我尝试了什么: 在进行分页和排序时,网格变为空,我急于使用ajaxcall返回功能但是在这里做分页返回主页面而不是下一页 i从参数传递给控制器​​的网格值

while doing pagination and sorting web grid become empty ,i tyrid to use ajaxcall back function but here while doing pagination its returning to the main page not to next page What I have tried: while doing pagination and sorting web grid become empty ,i tyrid to use ajaxcall back function but here while doing pagination its returning to the main page not to next page i am getting the web grid value from a parameter passing to the controler

推荐答案

@{ var grid = new WebGrid(Model, ajaxUpdateContainerId: "ajaxgrid", rowsPerPage: 20, canPage: true, canSort: true, ajaxUpdateCallback: "GetstatusbyAppraisalid"); IEnumerable<webgridcolumn> cols = new List<webgridcolumn> { new WebGridColumn{ ColumnName="empid", Header="emp ID", CanSort = true,Style= "colour:black !important", Format = @<text> <span class="display"><label id="lblKraId">@item.empid</label></span> </text> }, new WebGridColumn{ ColumnName="emp", Header="EmployeeID", Format = @<text> <span class="display"><label id="lblName">@item.EmployeeId</label></span> </text> }, new WebGridColumn{ ColumnName="", Header="Empname", Format = @<text> <span class="display"><label id="lblWeightage">@item.EmployeeName</label></span> </text> }, new WebGridColumn{ ColumnName="Grade", Header="Grade", Format = @<text> <span class="display"><label id="lblEmail">@item.Grade</label></span> </text> }, new WebGridColumn{ ColumnName="Position", Header="Position", CanSort = true,Style= "colour:black !important", Format = @<text> <span class="display"><label id="lblpos">@item.Position</label></span> </text> }, new WebGridColumn{ ColumnName="status", Header="Status", Format = @<text> <span class="display"><label id="lblStatus">@item.AppraisalStatus</label></span> </text> }, new WebGridColumn{ Header="Action", Format = @<text> <input type="radio" /> </text> }, }; } </webgridcolumn></webgridcolumn></div> @grid.GetHtml(columns: cols, rowStyle: "oddRowStyle", alternatingRowStyle: "evenRowStyle" , tableStyle: "gridTable", selectedRowStyle: "gridAltRow", htmlAttributes: new { id = "ajaxgrid" })

更多推荐

在进行分页和排序时,网格变得空洞

本文发布于:2023-07-19 08:52:31,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1154894.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分页   网格   空洞

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!