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

scheduler AJAX read max response limit

3 Answers 166 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 28 Oct 2015, 02:17 PM

Hi there,

I have a scheduler enabled in week and day view.  Each 1hr period per day has 1 item returned which is a template to encapsulate the items for that date (we couldn't use it out of the box before of our peculiar client requirements which require it to be very dynamic) - which works fine, but the result is that a lot of markup is returned via JSON from my controller.  It all works fine in day view, but in week view after adding more than a few days' worth of items the .read() method from javascript I call after an item is removed or added stops working - the spinner fires and the controller method is hit correctly, but it never re-renders the scheduler with the updated data.

I suspect it's a limit being hit somewhere - is there such a thing for the scheduler, as I can't find one anywhere?

Or do you have any advice for a better way to achieve this scenario?  I could return more raw data rather than HTML from the controller, but I'd essentially need to loop through multiple items inside an individual scheduler item and apply a template for each, which I don't think is possible?

Thanks,

Mark

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 30 Oct 2015, 08:01 AM
Hello,

Most probably the length of the JSON response exceeds the default MaxJsonLength. That why I would suggest to enable server filtering for the Scheduler in order to always load only the visible events from the server. Such example is available in the following repository in GitHub:

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 30 Oct 2015, 12:15 PM

Thanks Vladimir,

I tried the MaxJsonLength approach you suggested but no change - the response was around 370k so nothing too big.  I have my own implementation of server filtering already (my MVC controller accepts a start and end date to only return data for the visible dates), so there's nothing I can do with this.

It's strange it loads fine on first page load (full load or full postback) whereas with AJAX it doesn't work - do you have any ideas why this might be the case?  My current workaround is to reload the entire screen (full postback) but obviously I'd prefer an AJAX reload for the sake of user experience.

Let me know what you suggest.

Thanks, Mark

0
Vladimir Iliev
Telerik team
answered on 02 Nov 2015, 08:16 AM
Hello Mark,

From this point we would need sample project where the described issue is reproduced in order to investigate further current behavior. Could you please provide it? 

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Mark
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Mark
Top achievements
Rank 1
Share this question
or