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

AdvancedInsertTemplate & AdvancedEditTemplate with sql datasource

1 Answer 61 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
avinashg
Top achievements
Rank 1
avinashg asked on 05 Nov 2008, 02:58 PM
I am using AdvancedInsertTemplate & AdvancedEditTemplate in my schedular but my controls are not accessible at insert.

e.g of my insert parameter:
 <InsertParameters  >
 <asp:FormParameter FormField="Utilisateur" Name="Utilisateur"  />

e.g of my control in AdvancedInsertTemplate 
 <telerik:RadTextBox ID="Utilisateur" Text="test" runat="server">
                         </telerik:RadTextBox>


Do you have an example where you have used it with an sqldatatsource?

Thank you.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Nov 2008, 03:29 PM
Hello avinashg,

Could you please be more specific? What exactly do you need to achieve? The controls from the advanced template are available in the FormCreated event. Please, refer to the Templates online example.

 protected void RadScheduler1_FormCreated(object sender, SchedulerFormCreatedEventArgs e)  
        {  
           //* * *  
 
            if (e.Container.Mode == SchedulerFormMode.AdvancedInsert || e.Container.Mode == SchedulerFormMode.AdvancedEdit)  
            {  
                TextBox subjectBox = (TextBox)e.Container.FindControl("TitleTextBox");  
                subjectBox.Text = e.Appointment.Subject;  
 
                RadDateInput startInput = (RadDateInput)e.Container.FindControl("StartInput");  
                startInput.DateFormat = scheduler.EditFormDateFormat + " " + scheduler.EditFormTimeFormat;  
                startInput.SelectedDate = RadScheduler1.DisplayToUtc(e.Appointment.Start);  
 
                RadDateInput endInput = (RadDateInput)e.Container.FindControl("EndInput");  
                endInput.DateFormat = scheduler.EditFormDateFormat + " " + scheduler.EditFormTimeFormat;  
                endInput.SelectedDate = RadScheduler1.DisplayToUtc(e.Appointment.End);  
            }  
        }  
    } 


Regards,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
avinashg
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or