2013-02-21 99 views
3

我儘量延長我的WebGrid傳呼機,但是當我嘗試調用該方法來尋呼系統返回我的後續錯誤:的WebGrid Asp.Net MVC自定義傳呼機

System.Web.Helpers.WebGrid不包含定義PagerList和沒有擴展方法PagerList接受System.Web.Helpers.WebGrid類型的第一個參數可以找到(是否缺少using指令或程序集引用?)

LOOG我的類的構造函數:

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); 
    } 

LOOG我的WebGrid聲明,我的擴展類

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

聽起來像它可能是一個命名空間問題。你能告訴我們你的代碼的命名空間聲明嗎? – 2013-02-27 00:23:11

回答