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

custom edit label

2 Answers 87 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
possible
Top achievements
Rank 1
possible asked on 08 Jan 2008, 08:48 AM
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 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 08 Jan 2008, 03:11 PM
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
0
possible
Top achievements
Rank 1
answered on 08 Jan 2008, 05:04 PM
Thanks, now it works (i was missing the trick with rebind).
Tags
Scheduler
Asked by
possible
Top achievements
Rank 1
Answers by
T. Tsonev
Telerik team
possible
Top achievements
Rank 1
Share this question
or