custom edit label

3 posts, 0 answers
  1. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 08 Jan 2008 Link to this post

    Hi..

    I want to allow users to move to appointment edit by using simple LinkButton in AppointmentTemplate. I tried looking on javascript behind doubleclick on scheduler cell but its too complicated. Is easy way to create such button? Or is possible to simulate double click on appointment when users click on label?

    Regards
  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 08 Jan 2008 Link to this post

    Hello Tomasz,

    Such behavior is certainly possible. We can create an Appointment template with a link button:

    <AppointmentTemplate> 
        <%# Eval("Subject") %> 
        <asp:LinkButton runat="server" ID="LinkButton1" Text="Edit" CommandName="Edit" /> 
    </AppointmentTemplate> 
     

    Note that we are assigning a custom command name. Then we can handle AppointmentCommand in order to switch to edit mode:

    protected void RadScheduler1_AppointmentCommand(object sender, Telerik.Web.UI.AppointmentCommandEventArgs e) 
        if (e.CommandName == "Edit"
        { 
            RadScheduler1.Rebind(); 
            RadScheduler1.ShowInlineEditForm(e.Container.Appointment); 
        } 
     


    Calling rebind is needed in order to clear the internal state of the control, otherwise the edit form will not be rendered. You can also call ShowAdvancedEditForm.

    Kind regards,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. possible
    possible avatar
    77 posts
    Member since:
    Oct 2006

    Posted 08 Jan 2008 Link to this post

    Thanks, now it works (i was missing the trick with rebind).
Back to Top