This is a migrated thread and some comments may be shown as answers.

[Solved] Grid stopped working, and I didn't do anything

4 Answers 144 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mike
Top achievements
Rank 1
Mike asked on 01 Mar 2015, 06:17 PM
It worked yesterday, but not today. I didn't make any changes. Now it always displays "No items to display". I'm getting towards the end of my trial period (got a message when I loaded Visual Studio). Could that have something to do with it?

Here's the grid definition in the view:

@(Html.Kendo().Grid<CapEdit2.Models.Report>()
    .Name("SearchResultsGrid")
    .DataSource(ds => ds
        .Ajax()
        .Read(read => read
            .Action("GetSearchResults", "Report").Data("reportsReadData")
        )
        .PageSize(10)
    )
    .Columns(columns => 
    {
        columns.Bound(r => r.Id);
        columns.Bound(r => r.TransDate).Title("Trans Date").Format("{0:MM-dd-yyyy}"); 
        columns.Bound(r => r.Corporation.Name).Title("Corporation"); 
        columns.Bound(r => r.Headline); 
    })
    .Pageable()
    .Sortable()
)


Here's the server-side code that gets the data for the grid (I can see that it's working fine):

        public ActionResult GetSearchResults([DataSourceRequest]DataSourceRequest request, string company, DateTime startDate, DateTime endDate)
        {

            var context = new CapInternalContext();

            var query = (IQueryable<Report>)context.Reports
                    .Include("Corporation")
                    .Include("Stages");  

            var result = this.Json(query.ToDataSourceResult(request));
            return result; // I put a break point here, and always see results
        }

Thanks for your help!

Mike

4 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 03 Mar 2015, 01:36 PM
Hi Mike,

this does not seem like a known issue. The trial part should not have any effect on it, tough. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mike
Top achievements
Rank 1
answered on 03 Mar 2015, 06:04 PM
That's good to know. What is the solution?
0
Petyo
Telerik team
answered on 04 Mar 2015, 01:51 PM
Hello,

Like I said, this does not seem like a known issue. At this point, the information you provided is not enough for us to determine what goes on. Given that your source code hasn't changed, the problem is most likely somewhere else - maybe in the data passed to it. 

Regards,
Petyo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mike
Top achievements
Rank 1
answered on 15 Mar 2015, 04:56 PM
I've resolved the issue. Root cause was that the JSON data had circular references.
Tags
Grid
Asked by
Mike
Top achievements
Rank 1
Answers by
Petyo
Telerik team
Mike
Top achievements
Rank 1
Share this question
or