DayPilot Knowledge Base

AJAX Calendar/Scheduling Controls
DayPilot Pro (AJAX Calendar Control)
» DayPilot AJAX Calendar
DayPilot Pro (AJAX Monthly Calendar Control)
» DayPilot AJAX Monthly Calendar
DayPilot Pro (AJAX Scheduler Control)
» DayPilot AJAX Scheduler
DayPilot » Knowledge Base » How to rebind the Navigator after an event is added to a main control

How to rebind the Navigator after an event is added to a main control

Last revision: Aug 24, 2010

The DayPilotNavigator.VisibleRangeChanged event allows rebinding the free/busy information after date change. 

VisibleRangeChanged is fired automatically when you change the visible months by clicking the arrow links in the Navigator header:

navigator-rebind-arrows.png

If you want to refresh the Navigator free/busy information manually, you can call visibleRangeChangedCallBack() on the client-side:

dpn.visibleRangeChangedCallBack();

The best place to call visibleRangeChangedCallBack() is the AfterRenderJavaScript handler. 

AfterRenderJavaScript="afterRender(data)"
function afterRender(data) {
  if (data.navigatorRefresh) {
    dpn.visibleRangeChangedCallBack();
  }
}

In this case, the Navigator update will only be requested if you call Update() with the following parameters:

Hashtable data = new Hashtable();
data["navigatorRefresh"] = true;
DayPilotCalendar1.Update(data);

Related

How to update a GridView after an AJAX callback update of the main calendar control
How to highlight busy days in DayPilot Navigator (ASP.NET WebForms)
How to bind Navigator to multiple controls
Sample Navigator CSS Theme