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

[Solved] PostBack Event

3 Answers 205 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Chun
Top achievements
Rank 1
Chun asked on 31 Mar 2008, 05:42 PM
Hi,

Is there a way to execute server code (C#) when a user (double) clicks on a appointment on the radscheduler? 
BTW, the scheduler in this case is used to display data only (no edits, update, etc).

Thanks,

John

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 02 Apr 2008, 12:33 PM
Hello Chun,

If the appointments are not editable (e.g. appointment.AllowEdit = false), the server AppointmentClick event will not fire. Only OnClientAppointmentClick will fire. However, you can use this event along with RadAjaxManager to execute code on the server. Attached is a demo page which shows how to set a label's Text property to the Subject of a read-only appointment. I have used this topic as a starting point:  Manually add an AJAX request to a client-side event of an HTML element.

Let me know if you have any questions on this approach.

Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Charles
Top achievements
Rank 1
answered on 07 Apr 2008, 01:03 PM
Or you could try the following:

- Set AllowEdit = true
- Handle the FormCreating event and set the cancel property of the event to false

The AppointmentClick event will now fire on the server!
0
T. Tsonev
Telerik team
answered on 07 Apr 2008, 03:33 PM
Hi,

Thank you for the clever suggestion Charles. We have fixed this problem in the upcoming Q1 release, so you will no longer need to jump through hoops to overcome this limitation. The AppointmentClick event will fire regardless of the ReadOnly property.

Regards,
Tsvetomir Tsonev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Chun
Top achievements
Rank 1
Answers by
Peter
Telerik team
Charles
Top achievements
Rank 1
T. Tsonev
Telerik team
Share this question
or