0

我有剑道网格从动作加载数据

@(Html.Kendo().Grid<trwib_cct.Models.ViewModels.ApplicationUsersVM>()
.Name("Grid")
        .Columns(columns =>
        {
            columns.Bound(au => au.FirstName).Title("First Name").Width(200);
            columns.Bound(au => au.Roles).Title("CIP Code").Width(150);
            columns.Bound(au => au.StateID).Title("Status").Width(50);
            columns.Bound(au => au.StateName).Title("State").Width(50);
            columns.Bound(au => au.KeystoneID).Title("Keystone ID").Width(50);
            columns.Bound(au => au.IsWIAEligible).Title("Is WIA Eligible").Width(150);
            //columns.Bound(au => au.StateID).Visible(false);
            columns.Bound(au => au.ID).Visible(false);
        })
        .DataSource(dataSource => dataSource
            .Ajax()
               .Read(read => read.Action("datasource_read_Users", "dashboard", new { trainingProgramID = ViewBag.trainingProgramID }))
            )
        .Pageable(pager => pager
        .Refresh(true)
        .Messages(messages => messages.Empty("No Users Found")).PageSizes(true).ButtonCount(1))
    )

动作是

 public ActionResult DataSource_Read_Users([DataSourceRequest] DataSourceRequest requestUsers, int trainingProgramID)
    {
        List<ApplicationUsersVM> results = LoadUsersGridData(trainingProgramID);
        DataSourceResult dsr = results.ToDataSourceResult(requestUsers);
        return Json(dsr);
    }

一切看起来都很好并且工作正常,但不知道为什么它不加载数据。即使我没有收到任何错误。

谢谢

4

0 回答 0