Chris Trina
Top achievements
Rank 1
Chris Trina
asked on 05 Jan 2010, 01:15 PM
I need to be able to process a schedule click event serverside, is there any way to do this? Also, ideally I need access to the date and time that coorespond with where they clicked in the schedule. I've tried all of the serverside events but can't find one for this.
Thanks
Chris
Thanks
Chris
3 Answers, 1 is accepted
0
Shinu
Top achievements
Rank 2
answered on 05 Jan 2010, 02:17 PM
Hello Chris,
You can attach 'AppointmentClick' event if you want to invoke server event when user clicks on an appointment.
And if you want to execute any server code when user clicking on TimeSlot, then one suggestion to accomplish this is attaching ClicentSide event 'OnClientTimeSlotClick' to RadScheduler and invoking an ajaxRequest to server as shown below.
ASPX:
JavaScript:
CS:
-Shinu.
You can attach 'AppointmentClick' event if you want to invoke server event when user clicks on an appointment.
And if you want to execute any server code when user clicking on TimeSlot, then one suggestion to accomplish this is attaching ClicentSide event 'OnClientTimeSlotClick' to RadScheduler and invoking an ajaxRequest to server as shown below.
ASPX:
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |
| <telerik:RadScheduler OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick" |
| ID="RadScheduler1" StartInsertingInAdvancedForm="false" runat="server" DataEndField="End" |
| DataKeyField="ID" DataRecurrenceField="RecurrenceRule" DataRecurrenceParentKeyField="RecurrenceParentID" |
| DataSourceID="SqlDataSource2" DataStartField="Start" DataSubjectField="Subject" |
| OnClientTimeSlotClick="OnClientTimeSlotClick"> |
| </telerik:RadScheduler> |
JavaScript:
| function OnClientTimeSlotClick(sender, args) { |
| var time = args.get_time().localeFormat('MM/dd/yyyy hh:mm:ss'); |
| var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>"); |
| ajaxManager.ajaxRequest(time); |
| } |
CS:
| protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e) |
| { |
| String time = e.Argument.ToString(); |
| DateTime dt = (DateTime)Convert.ToDateTime(time); |
| } |
-Shinu.
0
Roffe
Top achievements
Rank 1
answered on 24 Feb 2010, 10:49 AM
If you have grouped by resource, how could you also get the correct resource ?
0
Hello Carl,
The resource is available through the get_resource() property. Full reference here:
http://www.telerik.com/help/aspnet-ajax/client-side-objects-schedulertimeslot-and-schedulermodel.html
Sincerely yours,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
The resource is available through the get_resource() property. Full reference here:
http://www.telerik.com/help/aspnet-ajax/client-side-objects-schedulertimeslot-and-schedulermodel.html
Sincerely yours,
Tsvetomir Tsonev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.