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

[Solved] Advance End Time

5 Answers 94 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Aditya
Top achievements
Rank 1
Aditya asked on 03 Jul 2009, 05:16 PM
Hi All,
         I want to be able to advance the end time by a certain time duration determined by a value in the database. Is there anyway I can achieve this ?

Thanks,
Aditya


5 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 08 Jul 2009, 04:20 PM
Hello Aditya,

This is possible, but the exact method depends on when you want to do this. If , for example, you want to adjust the end time before it's sent to the database, then you can use the AppointmentUpdate event.

Can you give us more details about your scenario?

Kind regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aditya
Top achievements
Rank 1
answered on 08 Jul 2009, 05:59 PM
I have a dropdown box on the advanced form. Depending on the value selected in the drop down I want to advance the end time accordinly.

Thanks,
Aditya
0
Peter
Telerik team
answered on 13 Jul 2009, 01:43 PM
Hello Aditya ,

You can use RadScheduler's Rebind() method to refresh the control when selecting a value from the dropdownlist and handle AppointmentDataBound to increase the end time of the appointments based on the user selection. Here is the approach in terms of code:

  <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="true" 
        onselectedindexchanged="DropDownList1_SelectedIndexChanged">  
        <asp:ListItem Value="0">1</asp:ListItem> 
        <asp:ListItem Value="1">2</asp:ListItem> 
        <asp:ListItem Value="2">3</asp:ListItem> 
    </asp:DropDownList> 


protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)  
    {  
        RadScheduler1.Rebind();  
    }  
    protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)  
    {         
        e.Appointment.End = e.Appointment.End.AddHours(double.Parse(DropDownList1.SelectedValue));  
    } 


Kind regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Aditya
Top achievements
Rank 1
answered on 14 Jul 2009, 01:41 AM
In my case the drop down is a part of the resource collection. So how do i get the ID of the dropdown box and then attach the selected index changed event to it. Also what is the ID of the description textbox on the insert/update forms ?

Thanks,
Aditya
0
Peter
Telerik team
answered on 14 Jul 2009, 08:59 AM
Hi Aditya ,

The kb article on How to access controls in the advanced form will help you get started:
http://www.telerik.com/support/kb/aspnet-ajax/scheduler/how-to-access-controls-in-the-advanced-form.aspx


Greetings,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Scheduler
Asked by
Aditya
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Aditya
Top achievements
Rank 1
Peter
Telerik team
Share this question
or