WebGrid 分页不工作

WebGrid Paging not working

我有一个下拉菜单和按钮控件,单击按钮时我正在绑定 WebGrid,它工作正常,加载时网格将为空,但绑定后网格分页不起作用,下面是我的代码

@using (Html.BeginForm("EmpLog", "Labels", FormMethod.Post))
{
  @Html.DropDownListFor(x => x.SelectedValue, Model.Values, "----Select----", new { id = "ddlName", @class = "form-control col-md-6" })
  <input type="submit" value="Search" id="btnSearch" class="btn btn-default" />

  @{
     var gridview = new WebGrid(source: Model.LstLog, rowsPerPage: 20, ajaxUpdateContainerId: "grid", canSort: false);
   }

  @if (Model.Lst != null)
   {
     @gridview.GetHtml(
                  htmlAttributes: new { id = "gridlogs" },
                  fillEmptyRows: false,
                  alternatingRowStyle: "alternate-row",
                  headerStyle: "grid-header",
                  footerStyle: "grid-footer",
                  selectedRowStyle: "grid-selected-row",
                  rowStyle: "grid-row-style",
                  mode: WebGridPagerModes.All,
                  firstText: "<< First",
                  previousText: "< Prev",
                  nextText: "Next >",
                  lastText: "Last >>",
                  columns: new[] {
                  gridview.Column("View", header: null, style: "click_able", format: @<text><a href="javascript:ViewFullDetails('@item.Id');">View</a></text>, canSort: false),
                  gridview.Column("JoinDate",header: "Join Date"),
                  gridview.Column("DeptName",header: "Dept Name"),
                  gridview.Column("Project",header: "Project")
                 }
             )}
    }

    [HttpGet]
    public ActionResult EmpLog()
    {
         model.Values = GetDDLInfo();
         return View();
    }

    [HttpPost]
    public ActionResult EmpLog()
    {
         model.Values = GetDDLInfo();
         model.LstLog= GetLogInfo();
         return View(model);
    }

我对WebGrid不够好,请帮我应用分页。

我添加了下面的代码来工作分页

$('th a, tfoot a').click(function () {
    $('form').attr('action', $(this).attr('href')).submit();
    return false;
});