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

Scheduler auto fill Date Subject

3 Answers 43 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Smally
Top achievements
Rank 1
Smally asked on 12 Oct 2010, 07:40 PM
I have a rad scheduler that I am using to display appointments. However when my user double clicks to add an appointment - i want to auto fill it with some information - is there an event such as "OnAppointmentInsertClicked" or something that will give me access to the subject field that will let me populate the value. So for instance when they double click on a time range I want the little popup to populate with values of the Customer Name. Is this possible?

3 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 14 Oct 2010, 09:25 AM
Hi Adrienne Potter,

You can prepopulate RadScheduler data in the OnFormCreated event. Here's a sample code of filling the Subject field:

protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e)   
    {   
        if (e.Container.Mode == SchedulerFormMode.AdvancedEdit || e.Container.Mode == SchedulerFormMode.AdvancedInsert)   
        {   
            RadTextBox subject = e.Container.FindControl("Subject") as RadTextBox;   
            subject.Text = "Modified subject:";   
        }   
    }   

Hope this helps.

Best wishes,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Smally
Top achievements
Rank 1
answered on 14 Oct 2010, 06:56 PM
Ok - but i don't use the advanced insert. I just use the plain one. I tried the following but its not setting the subject text? Any thoughts?

 

 

if(e.Container.Mode == SchedulerFormMode.Insert)

 

{

e.Container.Appointment.Subject =

 

"Installation Appointment";

 

}

0
Veronica
Telerik team
answered on 15 Oct 2010, 03:15 PM
Hi Adrienne Potter,

In the in-line editor we use multiline TexBox with ID - "SubjectTextBox". You'll need to find the TextBox and set the text to the new subject of the appointment. Here's the code to prepopulate the subject in the in-line editor :
  
protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e)
   {
       if (e.Container.Mode == SchedulerFormMode.Insert || e.Container.Mode == SchedulerFormMode.Edit)
       {
           TextBox subject = e.Container.FindControl("SubjectTextBox") as TextBox;
           subject.Text = "Modified subject:";
       }
   }

Please let me know if this was helpful.
 
Kind regards,
Veronica Milcheva
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Smally
Top achievements
Rank 1
Answers by
Veronica
Telerik team
Smally
Top achievements
Rank 1
Share this question
or