Findcontrol _AppointmentDelete

8 posts, 1 answers
  1. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 19 Jul 2011 Link to this post

    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

  2. Plamen
    Admin
    Plamen avatar
    2933 posts

    Posted 20 Jul 2011 Link to this post

    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!

  3. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 20 Jul 2011 Link to this post

    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
  4. Plamen
    Admin
    Plamen avatar
    2933 posts

    Posted 22 Jul 2011 Link to this post

    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!

  5. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 22 Jul 2011 Link to this post

    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


  6. Answer
    Plamen
    Admin
    Plamen avatar
    2933 posts

    Posted 25 Jul 2011 Link to this post

    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!

  7. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 26 Jul 2011 Link to this post

    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
  8. Karl
    Karl avatar
    172 posts
    Member since:
    Jun 2009

    Posted 26 Jul 2011 Link to this post

    Thanks, I found the way to access the appointment details
Back to Top