Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I have kendo grid loading data from action

@(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))
    )

And the action is

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

everything looks good and working but don't know why its not loading the data. even i did not get any error.

Thanks

share|improve this question
Is your action method hit at all? You can test that with the debugger. – Atanas Korchev 10 hours ago
@AtanasKorchev: Yes it hits all and returns records too. – Siraj Hussain 8 hours ago
Then check if the required JavaScript files are included: docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/… – Atanas Korchev 7 hours ago
Got the solution. It was my entity object fault. But kendoUI was not notifying the error not on java-script side too. so wierd. – Siraj Hussain 3 hours ago

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.