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

Single Click on Appointment

1 Answer 182 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 1
Matthew asked on 09 Sep 2008, 09:23 PM
I am currently having an issue with the scheduler that I am hoping someone will be able to help me with. Let me first explain what I am trying to accomplish...

I want to give the user the ability to insert an Appointment from a Scheduler by double clicking a specific time. The user should also have the ability to edit an appointment by double clicking one that was previously inserted. Both the new appointment and edit appointment happen in a different screen, so I am calling a redirect on the FormCreated method from the Server. When the user single clicks a previously inserted appointment, I have a panel under the scheduler that should update with information based on the selected appointment.

My problem is this. I can single click an appointment just fine, but then I will single click anywhere else on the scheduler and then single click again on the appointment and the FormCreated method will fire.

How can I prevent this from happening and get it to work correctly? Is there some sort of property that I need to set? Here is my call for the scheduler...

<telerik:RadScheduler ID="radScheduler" runat="server" EditFormDateFormat="dd-MM-yyyy" SelectedView="WeekView" Skin="WebBlue"
                Height="352px" StartEditingInAdvancedForm="false" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" DataEndField="End"
                OnFormCreating="radScheduler_FormCreating" OnClientAppointmentClick="appointmentSingleClick">
                </telerik:RadScheduler>

Any help would be great. Thanks.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 10 Sep 2008, 07:28 AM
Hello Matthew,

Another explanation is that RadScheduler maintains a selected state internally. The first click selects the appointment and the second fires the appointmentClick event. We will eventually develop this into fully featured selection, but for now you have to use the following workaround to clear the selected state after each click event:

function appointmentClick(sender, eventArgs)   
{   
    // ...   
    window.setTimeout(function() { eventArgs.get_appointment()._unselect() }, 0);   
}   
 


Best wishes,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Scheduler
Asked by
Matthew
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or