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

RadScheduler all day Checkbox not find in AppointmentInsert Event

1 Answer 74 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
kasi
Top achievements
Rank 1
kasi asked on 05 Jul 2011, 02:14 PM
Hi,
I am not able to find the all day Checkbox Value in  AppointmentInsert Event And also The CustomAttribute textbox also not able to find. Please Help me on this.

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 08 Jul 2011, 02:33 PM
Hello Kasi,

In the AppointmentInsert you cannot directly get the value of the checkbox  but still you can do some validation like this:
protected void RadScheduler1_AppointmentInsert1(object sender, AppointmentInsertEventArgs e)
   {
      // FindControl("RadScheduler1").FindControl("")
       String csname1 = "PopupScript";
       Type cstype = this.GetType();
       // Get a ClientScriptManager reference from the Page class.
       ClientScriptManager cs = Page.ClientScript;
       // Check to see if the startup script is already registered.
       if (String.IsNullOrEmpty(e.Appointment.Attributes["Localization"]))
       {
           String cstext1 = "alert('The Localization field should not be empty!');";
           cs.RegisterStartupScript(cstype, csname1, cstext1, true);
           e.Cancel = true;
       }
       if (e.Appointment.Duration.TotalHours%24==0)
       {
           String cstext1 = "alert('APP should not be all day');";
           cs.RegisterStartupScript(cstype, csname1, cstext1, true);
           e.Cancel = true;
       }
      
   }
 
All the best,
Plamen Zdravkov
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
Scheduler
Asked by
kasi
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or