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

How to access Advanced form save button event?

3 Answers 96 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Gus
Top achievements
Rank 1
Gus asked on 09 Jun 2011, 09:29 PM
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

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 13 Jun 2011, 12:21 PM
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.

0
Gus
Top achievements
Rank 1
answered on 13 Jun 2011, 05:50 PM
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

 

0
Gus
Top achievements
Rank 1
answered on 13 Jun 2011, 06:18 PM

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

 

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