private void CalendarCtrl_SelectedViewChange(object sender, Mediachase.Web.UI.WebControls.CalendarViewSelectEventArgs e) { SelectRightTab(e.NewViewType); BindLabelHeader(); BindClendarControl(); }
/// <summary> /// Called when the Calendar on the client-side submitted the form. /// </summary> /// <param name="eventArg">Event argument.</param> protected bool ProcessEvents(string eventArg) { if (eventArg == null || eventArg == String.Empty || eventArg == " ") // Don't know why, but the framework is giving a " " eventArg instead of null return false; String[] events = eventArg.Split(new Char[] {';'}); foreach (string strWholeEvent in events) { String[] parms = strWholeEvent.Split(new Char[] {','}); if (parms[0].Length > 0) { if (parms[0].Equals("OnSelectedViewChange") && parms.GetLength(0) == 3) { CalendarViewSelectEventArgs e = new CalendarViewSelectEventArgs(DateTime.Parse(parms[1]), (CalendarViewType)Int32.Parse(parms[2])); DoSelectedViewChange(e); } } } return false; }
/// <summary> /// Event handler for selection changes. /// </summary> /// <param name="e">Event arguments.</param> public virtual void OnSelectedViewChange(CalendarViewSelectEventArgs e) { if (SelectedViewChange != null) SelectedViewChange(this, e); }
/// <summary> /// Called when a Calendar View changes. /// </summary> /// <param name="e">Event arguments.</param> public virtual void DoSelectedViewChange(CalendarViewSelectEventArgs e) { this.SelectedDate = e.NewDate; this.ViewType = e.NewViewType; OnSelectedViewChange(e); }