This is a migrated thread and some comments may be shown as answers.

Next/Previous Navigation Problem

3 Answers 108 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 04 Oct 2007, 11:57 AM
I was making good progress with the suggestions I have received through the forum here.  The appointments are displaying the way I want without the delete icon.  The problem now, is when I click on "Next" in any of the views, it will only move one period ahead no matter how many times I click on the button.  The same is true for previous.  In any view, if I click on Next the calendar moves only one period ahead and no further.  If I then click previous, instead of going back one period it goes back two periods and skips the previous period.  This behavior is true for all of the views.

Thanks,

Steve

3 Answers, 1 is accepted

Sort by
0
Steve
Top achievements
Rank 1
answered on 04 Oct 2007, 02:35 PM
I dropped a new scheduler on the same page and connected it to the same data source and it works fine the only thing I have added to the .aspx is the following CSS and the Appointment Template.

CSS Added
 <style type="text/css">
    .disableDelete .rsAptDelete
    {
        left: -4000px;
    }       

CODE
Protected Sub ExampleScheduler_AppointmentCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCreatedEventArgs) Handles ExampleScheduler.AppointmentCreated
        e.Appointment.CssClass = "disableDelete"
    End Sub

Appointment Template

<AppointmentTemplate>
    <center><asp:Button ID="btnCancel" Visible="true" Text="Cancel" ForeColor="maroon" Font-Bold="true" Font-Size="8pt" OnClick="btnCancelAppt_Click" runat="server" /></center>
        <table width="100%" cellpadding="0" cellspacing="0">
            <tr>
                <td align="center" style ="width:60%"><label style="color:Maroon; font-size:6pt; font-weight:bold; font-family:Verdana">Appt. Type: </label></td>
            </tr>
            <tr>
                <td align="center" style ="width:40%; font-size:7pt; font-family:Verdana">&nbsp<%# Eval("Subject") %></td>
            </tr>
            <tr>
                <td align="center" style ="width:60%"><label style="color:Maroon; font-size:6pt; font-weight:bold; font-family:Verdana">Trans. Type: </label></td>
            </tr>
                        <tr>
                <td align="center" style ="width:40%; font-size:7pt; font-family:Verdana">&nbsp<%# Eval("Attributes['TransType']") %> </td>
            </tr>
            <tr>
                <td align="center" style ="width:60%"><label style="color:Maroon; font-size:6pt; font-weight:bold; font-family:Verdana">Location: </label></td>
            </tr>
            <tr>
                <td align="center" style ="width:40%; font-size:7pt; font-family:Verdana">&nbsp<%#Eval ("Attributes['Location']")%></td>
            </tr>
        </table>
</AppointmentTemplate>


0
Dimitar Milushev
Telerik team
answered on 05 Oct 2007, 08:34 AM
Hello Steve,

A common mistake that may cause this is setting the SelectedDate in the code-behind on each Postback. The proper way to do it is this:

private void Page_Load(object sender, EventArgs e)  
{  
    if (!IsPostBack)  
    {  
        RadScheduler1.SelectedDate = DateTime.Now;  
    }  

I hope this helps.

Best wishes,
Dimitar Milushev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Steve
Top achievements
Rank 1
answered on 08 Oct 2007, 12:43 PM
Thanks, That was it.
Tags
Scheduler
Asked by
Steve
Top achievements
Rank 1
Answers by
Steve
Top achievements
Rank 1
Dimitar Milushev
Telerik team
Share this question
or