本文介绍了在进行分页和排序时,网格变得空洞的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在进行分页和排序时,网格变为空,我使用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" })
更多推荐
在进行分页和排序时,网格变得空洞
发布评论