How to access Advanced form save button event?

4 posts, 0 answers
  1. Gus
    Gus avatar
    8 posts
    Member since:
    Feb 2009

    Posted 09 Jun 2011 Link to this post

    Hi,
    Im new to asp.net and I am struggling on how to access the Advanced Form save event to send an email after every new appointment.  Any examples on how to accomplish this would be great.  I would also like to grab the values from the advanced form and include them in the email.

    Thank you,
    Gus
  2. Plamen
    Admin
    Plamen avatar
    2958 posts

    Posted 13 Jun 2011 Link to this post

    Hi Gus,

    Here is a simple example how you can take the values when clicking the "save" button in the AppointmentCommand event:
    protected void RadScheduler1_AppointmentCommand(object sender, AppointmentCommandEventArgs e)
       {
           if (e.CommandName=="Update")
           {
               Response.Write("Button Save pressed!" + "</br>");
               Response.Write(e.Container.Appointment.Subject+"</br>");
               Response.Write(e.Container.Appointment.Start + "</br>");
               Response.Write(e.Container.Appointment.End + "</br>");
           }
       }


    All the best,
    Plamen Zdravkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Gus
    Gus avatar
    8 posts
    Member since:
    Feb 2009

    Posted 13 Jun 2011 Link to this post

    Thank you!

    I am getting the values for everything exept for "Subject".  Not sure why.

    Protected

     

     

    Sub RadScheduler1_AppointmentCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentCommandEventArgs) Handles RadScheduler1.AppointmentCommand

     

     

     

     

    If True Then

     

     

     

    If e.CommandName = "Insert" Then

     

    Response.Write(

     

    "Button Save pressed!" & "</br>")

     

     

    Response.Write(e.Container.Appointment.Subject +

     

    "</br>")

     

     

    TextBox1.Text = (e.Container.Appointment.Start +

     

    "</br>")

     

     

    Response.Write(e.Container.Appointment.[End] +

     

    "</br>")

     

     

     

     

    End If

     

     

     

    End If

     

  4. Gus
    Gus avatar
    8 posts
    Member since:
    Feb 2009

    Posted 13 Jun 2011 Link to this post

    This worked:

     

     

    Protected

     

     

    Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentInsertEventArgs) Handles RadScheduler1.AppointmentInsert

     

     

     

     

    If e.Appointment.Subject = String.Empty Then

     

     

     

     

     

     

     

    e.Cancel =

     

    True

     

     

     

     

     

     

     

     

     

    Else

     

     

     

     

     

     

     

    TextBox1.Text = (e.Appointment.Subject)

     

     

     

    End If

     

     

     

     

     

     

     

     

     

    End Sub

     

Back to Top