I am using MVC 4 and kendo UI for grid population. But the grid is not populating correctly.

this is my View :

<script type="text/javascript">

            url: '@Url.Action("Employee_Read", "UserSummary")',
            type: 'GET',
            dataType: "json",
            Async: true,
            success: function (data, textStatus, xhr) {
                var dataloc = data;

                var element = $("#grid4").kendoGrid({
                    dataSource: {
                        data: dataloc,
                        schema: {
                            model: {
                                fields: {
                                    userDetailsId: { type: "number", editable: false },
                                    name: { type: "string", editable: false },
                                    roleId: { type: "string", editable: false },
                                    emailId: { type: "string", editable: false }

Conroller ;

    public ActionResult Employee_Read([DataSourceRequest]DataSourceRequest request)
        using (var emp = new MockProjectAkarshEntities1())
          IQueryable<tbl_UserDetails> userDetails = emp.tbl_UserDetails;

            DataSourceResult result = userDetails.ToDataSourceResult(request);

            return Json(result,JsonRequestBehavior.AllowGet);


In the output I am getting something like "[object][object]" and no of rows in the table returned from database.the skeleton of grid is coming but not the data. I am new to MVC and kendo. Please help me out.

Related posts

Recent Viewed