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

[Solved] Fetch RadScheduler TimeSlot DateTime in Insert Template

1 Answer 179 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
aman
Top achievements
Rank 1
aman asked on 26 Jun 2008, 09:38 AM
Hi, 
  What i want is, to fetch The date time where the user has clicked to insert the appointment, so that the starting time and end date time of an appointment can be filled with the same date time where user has cliked in the time slot,
i am using AdvanceInsertTemplate,
so is this possible, how?
Thanx in advance

1 Answer, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 27 Jun 2008, 01:16 PM
Hi,

You can take a look at the "Customizing the advanced template" example that demonstrates how to transfer this information to your template. In short, you need to use ASP.NET binding expressions. For example:

<telerik:RadScheduler   ID="RadScheduler1" runat="server" ProviderName="TestSchedulerProvider" 
                        SelectedDate="2008-06-06" SelectedView="MonthView" Height="600px"
    <AdvancedInsertTemplate> 
        <uc1:InsertTemplate ID="InsertTemplate1" runat="server" Start='<%# Bind("Start") %>' />              
    </AdvancedInsertTemplate> 
</telerik:RadScheduler>      

Then you need to define the Start property in the appointment user control:

using System.ComponentModel; 
 
// ... 
 
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)] 
public DateTime Start 
    get 
    { 
        return Convert.ToDateTime(StartTime.Text); 
    } 
 
    set 
    { 
        StartTime.Text = value.ToString(); 
    } 


Regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
aman
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
Share this question
or