Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Stephen Neander on Jan 11, 2010 17:22
open dhtmlx forum
Scheduler - load week by week

It's great that we can dynamically load a month at a time but I'm finding that even this amount of data is presenting too much of a lag. Is it possible to add an option to load varying amounts of data depending on the view.
in day and user view (by day, week, month or everything)
in week view (by week, month or everything)
in month view (by month or everything)
The one that would help me is loading week by week.
Answer posted by Stanislav (support) on Jan 12, 2010 02:07
>>The one that would help me is loading week by week.
Technically you can use any countable date period, so the next command will load data by weeks
        scheduler.setLoadMode("week");

>> to load varying amounts of data depending on the view.
While it possible to call setLoadMode from onBeforeViewChange handler , it is not recommended use-case. Client side caching will not be able to work correctly in such scenario. ( if client side caching will be disabled then switching loading mode on the fly will not have any other drawbacks ) 
Answer posted by Stanislav (support) on Jan 12, 2010 02:08
Actually you can use 
    scheduler.setLoadMode("day");

The "day" is minimal loading unit, which means that in week view data will be requested for all 7 days at once and in month view for all 30+ days ( not the individual requests for each day ) 
Answer posted on Jan 14, 2010 00:30
This almost works.
In day mode it skips a day then loads 2 days.
eg if I'm viewing the 24th Dec, navigate to 23rd does nothing, navigate to 22nd loads both 22nd & 23rd
In the other direction navigate to 25th & it loads 25th & 26th
Answer posted by Stanislav (support) on Jan 14, 2010 03:02
Are you using scheduler 2.1 or older version?
The latest version send correct requests for each day, we are not able to reconstruct the problem.