RadScheduler all day Checkbox not find in AppointmentInsert Event

2 posts, 0 answers
  1. kasi
    kasi avatar
    29 posts
    Member since:
    May 2011

    Posted 05 Jul 2011 Link to this post

    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.
  2. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 08 Jul 2011 Link to this post

    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!

Back to Top