search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How do I refresh the dataset with refreshCallBack

Asked by Doug
10 years ago.
Hello,

Right now, I'm loading an entire year's events in the dataset for my calendar. Then I have "Next Week" "Previous Week" buttons to jump from week to week using the javascript:refresshCallBack command.

My question is: how do I load only one week at a time in the dataset, rather than the whole year? Is this something I do in the cal_Refresh method?

Thank you
Comment posted by Dan Letecky
10 years ago.
You need to rebind - using DayPilotCalendar.DataBind() - every time you make a change to the event set. That means typically:
  • In Page_Load in if (!IsPostBack) section.
  • After moving, resizing, deleting... the event. That is inside EventMove, EventResize, EventDelete event handlers, right after updating your database.
  • In Refresh event handler (after switching the Date).
In all cases, you should limit your selection to the time range determined by DayPilotCalendar.StartDate and DayPilotCalendar.EndDate.

For an example SELECT query, see
http://forums.daypilot.org/Topic.aspx/208/daypilot_sql_sample_application
This question is more than 6 months old and has been closed. Please create a new question if you have anything to add.