繁体   English   中英

WebGrid Asp.Net MVC 自定义寻呼机

[英]WebGrid Asp.Net MVC Custom Pager

我正在尝试扩展我的 webgrid 寻呼机,但是当我尝试调用该方法来寻呼系统时,会返回以下错误:

System.Web.Helpers.WebGrid不包含PagerList的定义,并且找不到接受System.Web.Helpers.WebGrid类型的第一个参数的扩展方法PagerList (您是否缺少 using 指令或程序集引用?)

寻找我的类构造函数:

 public static HelperResult PagerList(
                this WebGrid webGrid,
                WebGridPagerModes mode = WebGridPagerModes.NextPrevious | WebGridPagerModes.Numeric,
                string firstText = null,
                string previousText = null,
                string nextText = null,
                string lastText = null,
                int numericLinksCount = 5)
    {
        return PagerList(webGrid, mode, firstText, previousText, nextText, lastText, numericLinksCount, explicitlyCalled: true);
    }

查找我的 Webgrid 声明和扩展类

var grdConvidados = new WebGrid(null, rowsPerPage: 10, ajaxUpdateContainerId: "deploymentsGrid", canSort: false, canPage:true);
    @grid.PagerList(mode: WebGridPagerModes.All)

文章介绍了使用 WebGrid Web Helper 进行高效分页 - ASP.NET MVC

http://www.dotnetcurry.com/ShowArticle.aspx?ID=618

谢谢

暂无
暂无

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

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