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

Findcontrol _AppointmentDelete

7 Answers 53 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 19 Jul 2011, 01:33 PM

Hi,

How do I go about finding a control in the AppointmentDelete? I;ve tried

 

e.Appointment.AppointmentControls[0].FindControl[

 

"txtname"].

I know how to do it in the

 

RadScheduler1_FormCreated

Thanks

7 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 20 Jul 2011, 02:13 PM
Hello Karl,

Would you please be more specific which exactly control are you trying to access because in the AppoindmentDelete  there is no access to any advanced form unlike Form_Created (kb article).

Best wishes,
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!

0
Karl
Top achievements
Rank 1
answered on 20 Jul 2011, 02:20 PM
Hi,
In the advanceform the there is a text field where a user can add some text to reject a booking. When they click the button it will send an email. I want to get the text from this field and add it to the email which is sent on the AppointmentDelete.

How would I do this ?

Thanks
0
Plamen
Telerik team
answered on 22 Jul 2011, 04:02 PM
Hello Karl,

In the AppointmentDelete server-side event you can get all the appointment properties like subject, description and attributes:

protected void RadScheduler1_AppointmentDelete(object sender, AppointmentDeleteEventArgs e)
   {
       string subject = e.Appointment.Subject;
       string description = e.Appointment.Description;
       string attribute = e.Appointment.Attributes["Name of the Attibute"];
   }

Kind regards,
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!

0
Karl
Top achievements
Rank 1
answered on 22 Jul 2011, 04:37 PM
HI,
I need to access a textfield in the editform and use the content of that in an email whichh is sent on the:
_AppointmentDelete
I have the following textfield in the

 

 

<AdvancedEditTemplate>

 

<

 

 

asp:TextBox ID="ReasonTextBox" Rows="5" Columns="20" runat="server" Text='<%# Bind("Reason") %>'

 

 

 

TextMode="MultiLine" Width="300"></asp:TextBox>

In the <AdvancedEditTemplate> I have a button shown below which fires the event.

 

<asp:Button ID="Button3" runat="server" Text="Reject Reservation" OnClick="RadScheduler1_Delete" />
  
protected void RadScheduler1_Delete(object sender, EventArgs e)
    {
        SchedulerFormContainer container = (SchedulerFormContainer)((Button)sender).BindingContainer;
        RadScheduler1.DeleteAppointment(container.Appointment, true);
        RadScheduler1.Rebind();
    }

I guess this then triggers the AppointmentDelete which sends the email. How can I access the textfield

Is this possible?

Thanks


0
Accepted
Plamen
Telerik team
answered on 25 Jul 2011, 02:41 PM
Hello Karl,

Here is a simple demo project that shows how you can take the text from a textbox in the AdvancedEditForm template.

Best wishes,
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!

0
Karl
Top achievements
Rank 1
answered on 26 Jul 2011, 08:39 AM
Thanks, Is it also possible to get appointment information at this point as well? I need a combination of both appointment information and information from the textfield?

Thanks
0
Karl
Top achievements
Rank 1
answered on 26 Jul 2011, 10:02 AM
Thanks, I found the way to access the appointment details
Tags
Scheduler
Asked by
Karl
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Karl
Top achievements
Rank 1
Share this question
or