c# - WebGrid Asp.Net MVC 自定义寻呼机

标签 c# asp.net-mvc

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

System.Web.Helpers.WebGrid不包含 PagerList 的定义并且没有扩展方法 PagerList接受类型为 System.Web.Helpers.WebGrid 的第一个参数可以找到(您是否缺少 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

谢谢

关于c# - WebGrid Asp.Net MVC 自定义寻呼机,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15014117/

相关文章:

asp.net-mvc - 在 Orchard CMS 中通过字段查询 ContentPart

asp.net-mvc - ASP.net Web API 现在是 ASP.net MVC 4 的一部分吗?

javascript - Kendo 在初始文件选择后上传复制文件

c# - 在 EF Core 2.0 中动态访问表

c# - 如何让devexpress gridcontrol的indicator显示文字加粗

c# - 在 c# winforms 中动态取消引用一个 dll

javascript - MVC - 链接到另一个 Controller /操作时出现问题

C# 最佳实践 : Private var and Public Getter/Setter or Public Var

c# - 如何延迟停止和启动函数应用

c# - 使用 Entity Framework 将更改保存到 SQL Server 数据库时,一个或多个实体的验证失败