Hi,
I am using RadScheduler with websevice (v.2012.1.411). I use args.get_schedulerInfo() to pass extra info to the webservice on event OnClientAppointmentsPopulating, it is working well.
But when I try to use args.get_schedulerInfo() in event OnClientAppointmentWebServiceInserting, It pops up javascrip undefined error. I checked the online document http://www.telerik.com/help/aspnet-ajax/p_telerik_web_ui_radscheduler_onclientappointmentwebserviceinserting.html , This property should be supported in this event. here is the code,
Thanks in advance
Jason
I am using RadScheduler with websevice (v.2012.1.411). I use args.get_schedulerInfo() to pass extra info to the webservice on event OnClientAppointmentsPopulating, it is working well.
But when I try to use args.get_schedulerInfo() in event OnClientAppointmentWebServiceInserting, It pops up javascrip undefined error. I checked the online document http://www.telerik.com/help/aspnet-ajax/p_telerik_web_ui_radscheduler_onclientappointmentwebserviceinserting.html , This property should be supported in this event. here is the code,
function
OnClientAppointmentWebServiceInserting(sender, args) {
var
schedulerInfo = args.get_schedulerInfo();
alert(schedulerInfo);
var
userName =
'<%=UserName %>'
;
schedulerInfo.UserName = userName;
}
Thanks in advance
Jason
7 Answers, 1 is accepted
0
Hi Jason,
Thank you for reporting this problem.
I did some testing on the case and verified that there is indeed a problem. Here are some more details that I found - args.get_schedulerInfo() actually returns an object as expected, but it is of type SchedulerInfo instead of MyCustomSchedulerInfo (or whatevet it is called in your case). As a result of this, the additional fields that you expose in your custom class are not available - args.get_schedulerInfo().UserName.
I will log the issue and we will fix it for the next release.
Please, accept our apologies for the caused inconvenience.
Greetings,
Peter
the Telerik team
Thank you for reporting this problem.
I did some testing on the case and verified that there is indeed a problem. Here are some more details that I found - args.get_schedulerInfo() actually returns an object as expected, but it is of type SchedulerInfo instead of MyCustomSchedulerInfo (or whatevet it is called in your case). As a result of this, the additional fields that you expose in your custom class are not available - args.get_schedulerInfo().UserName.
I will log the issue and we will fix it for the next release.
Please, accept our apologies for the caused inconvenience.
Greetings,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jason Li
Top achievements
Rank 1
answered on 02 May 2012, 01:31 PM
Thanks Peter. But actually the issue is that args.get_schedulerInfo() is not recognised at all. Please see the code attached, it stops at the first line. it looks like the get_schedulerInfo() method is not exposed to the event args. btw, My dev environment is VS2010 and the target framework is 3.5.
I have also found another document from Telerik, http://www.telerik.com/help/aspnet-ajax/scheduler-onclientappointmentwebserviceinserting.html , it says this event OnClientAppointmentWebServiceInserting does not support the get_schedulerInfo(). I am a bit confused with the two documents (the doc link in my question post), not sure which one is the correct one.
I want to pass some parameters when insert a new appointment, the insert web method does take two parameters, type of ISehedulerInfo and Appointment, but I don't know how to pass the ISehedulerInfo parameter...
I have also found another document from Telerik, http://www.telerik.com/help/aspnet-ajax/scheduler-onclientappointmentwebserviceinserting.html , it says this event OnClientAppointmentWebServiceInserting does not support the get_schedulerInfo(). I am a bit confused with the two documents (the doc link in my question post), not sure which one is the correct one.
I want to pass some parameters when insert a new appointment, the insert web method does take two parameters, type of ISehedulerInfo and Appointment, but I don't know how to pass the ISehedulerInfo parameter...
function
OnClientAppointmentWebServiceInserting(sender, args) {
var
schedulerInfo = args.get_schedulerInfo();
}
0
Jason Li
Top achievements
Rank 1
answered on 04 May 2012, 02:10 AM
Hi Peter,
Does OnClientAppointmentWebServiceInserting support the get_schedulerInfo()?
Cheers
Does OnClientAppointmentWebServiceInserting support the get_schedulerInfo()?
Cheers
0
Hello Jason,
The problem that you experience - "that args.get_schedulerInfo() is not recognised at all" is specific to .NET 3.5. Is it possible for you to migrate to framework 4.0?
Kind regards,
Peter
the Telerik team
The problem that you experience - "that args.get_schedulerInfo() is not recognised at all" is specific to .NET 3.5. Is it possible for you to migrate to framework 4.0?
Kind regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Jason Li
Top achievements
Rank 1
answered on 07 May 2012, 08:28 AM
Many thanks Peter, it makes sense. I will have a try with .net 4. For now I will use session as a workaround.
0
Jason Li
Top achievements
Rank 1
answered on 07 May 2012, 12:17 PM
Have tried in .net 4, same javascript error [object Object] has no method 'get_schedulerInfo' . Hope Telerik can fix this issue in the next release.
0
Hello Jason,
Further testing revealed that actually there is no bug in the .net 4.0 build. The only issue is that the intellisense of the debug tools does not reveal the additional fields exposed in the custom class that inherits SchedulerInfo. However, everything works as expected. Here is a video capture as part of our testing -
http://screencast.com/t/nZC87XfxF.
I have attached a sample for reference. There I set the TeacherID property to 1 in OnClientAppointmentWebServiceInserting and use a flag to prevent resetting it in OnClientAppointmentsPopulating. The final result is that when you insert a new appointment, only appointments for Teacher 1 are visible.
Greetings,
Peter
the Telerik team
Further testing revealed that actually there is no bug in the .net 4.0 build. The only issue is that the intellisense of the debug tools does not reveal the additional fields exposed in the custom class that inherits SchedulerInfo. However, everything works as expected. Here is a video capture as part of our testing -
http://screencast.com/t/nZC87XfxF.
I have attached a sample for reference. There I set the TeacherID property to 1 in OnClientAppointmentWebServiceInserting and use a flag to prevent resetting it in OnClientAppointmentsPopulating. The final result is that when you insert a new appointment, only appointments for Teacher 1 are visible.
var
flag =
true
;
function
OnClientAppointmentsPopulating(sender, eventArgs) {
//debugger;
if
(flag)
eventArgs.get_schedulerInfo().TeacherID = teacherID;
}
function
OnClientAppointmentWebServiceInserting(sender, eventArgs)
{
//debugger;
eventArgs.get_schedulerInfo().TeacherID = 1;
flag =
false
;
}
Greetings,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.