Hi, I'm using scheduler and I have placed a linkbutton within a div on the page to appear at the bottom of the scheduler. The aspx code for this is:
3rd line down is my link button. In the code behind on change of view i.e. (day, week, month) I have the following C# code:
The event is fired and it falls into the appropriate case statement, and if I interrogate the linkbutton at runtime in debug mode it tells me the state of the linkbutton has changed appropriately. However when I do click on month view, although it does go through all the motions and appears to be correctly set as not visible, when the page renders the linkbutton still displays. Any ideas?
Regards
Mike
| <div id="outlookWrapper"> |
| <h1><asp:Label runat="server" ID="patientsName"></asp:Label></h1> |
| <div id="outlookLinkButton"><asp:LinkButton ID="lbChangeSlots" runat="server" |
| onclick="lbChangeSlots_Click">View by 15 min slots</asp:LinkButton></div> |
| <telerik:RadSplitter runat="server" ID="RadSplitter1" Height="535px" Width="576px" Skin="Web20" BorderSize="0"> |
| <telerik:RadPane runat="server" ID="CalendarPane" MinWidth="200" Width="200px" CssClass="calendarPane"> |
| <telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" |
| DayNameFormat="FirstTwoLetters" EnableMonthYearFastNavigation="false" |
| EnableMultiSelect="false" EnableNavigation="true" |
| OnDefaultViewChanged="RadCalendar1_DefaultViewChanged" |
| OnSelectionChanged="RadCalendar1_SelectionChanged" ShowRowHeaders="false" |
| Skin="Office2007"> |
| </telerik:RadCalendar> |
| <p></p> |
| <telerik:RadCalendar ID="RadCalendar2" runat="server" AutoPostBack="true" |
| DayNameFormat="FirstTwoLetters" EnableMonthYearFastNavigation="false" |
| EnableMultiSelect="false" EnableNavigation="false" |
| OnSelectionChanged="RadCalendar2_SelectionChanged" ShowRowHeaders="false" |
| Skin="Office2007"> |
| </telerik:RadCalendar> |
| <p></p> |
| <telerik:RadCalendar ID="RadCalendar3" runat="server" AutoPostBack="true" |
| DayNameFormat="FirstTwoLetters" EnableMonthYearFastNavigation="false" |
| EnableMultiSelect="false" EnableNavigation="false" |
| OnSelectionChanged="RadCalendar3_SelectionChanged" ShowRowHeaders="false" |
| Skin="Office2007"> |
| </telerik:RadCalendar> |
| <p></p></telerik:RadPane> |
| <telerik:RadSplitBar runat="server" id="RadSplitBar1" BorderWidth="0" /> |
| <telerik:RadPane runat="server" ID="SchedulerPane" CssClass="schedulerPane" MinWidth="554" Width="554px"> |
| <telerik:RadScheduler ID="RadScheduler1" runat="server" AllowDelete="False" |
| AllowEdit="false" DataEndField="ObservationDate" DataKeyField="MessageID" |
| DataSourceID="GetCalendarViewDataSource" DataStartField="ObservationDate" |
| DataSubjectField="TextDescription" EnableEmbeddedSkins="True" Height="557px" |
| MinutesPerRow="30" OnAppointmentClick="RadScheduler1_AppointmentClick" |
| OnNavigationComplete="RadScheduler1_NavigationComplete" |
| OverflowBehavior="Expand" ReadOnly="true" SelectedView="DayView" |
| ShowAllDayRow="false" Skin="Office2007" StartInFullTime="True" |
| TimeLabelRowSpan="2" TimeZoneOffset="03:00:00" WorkDayEndTime="18:00:00" |
| WorkDayStartTime="08:00:00"> |
| </telerik:RadScheduler> |
| </telerik:RadPane> |
| </telerik:RadSplitter> |
| </div> |
3rd line down is my link button. In the code behind on change of view i.e. (day, week, month) I have the following C# code:
| /// <summary> |
| /// test |
| /// </summary> |
| /// <param name="sender"></param> |
| /// <param name="e"></param> |
| protected void RadScheduler1_NavigationComplete(object sender, SchedulerNavigationCompleteEventArgs e) |
| { |
| switch (e.Command.ToString()) |
| { |
| case "SwitchToDayView": |
| { |
| lbChangeSlots.Visible = true; |
| break; |
| } |
| case "SwitchToWeekView": |
| { |
| lbChangeSlots.Visible = true; |
| break; |
| } |
| case "SwitchToMonthView": |
| { |
| lbChangeSlots.Visible = false; |
| break; |
| } |
| default: |
| { |
| break; |
| } |
| } |
| RadCalendar1.FocusedDate = RadScheduler1.SelectedDate; |
| SyncCalendars(); |
| } |
The event is fired and it falls into the appropriate case statement, and if I interrogate the linkbutton at runtime in debug mode it tells me the state of the linkbutton has changed appropriately. However when I do click on month view, although it does go through all the motions and appears to be correctly set as not visible, when the page renders the linkbutton still displays. Any ideas?
Regards
Mike