I using a web service to bind the scheduler and now trying to populate the resources. I need to pass some additional info to the web service so I've created a class that implements ISchedulerInfo and have followed the instructions for passing additional info to the web service via a custom implementation of ISchedulerInfo. I'm successful with the call to GetAppointments with additional parameters but I set the custom parameters in javascript.
So, the web service settings show ResourcePopulationMode="ServerSide". On the page...
Protected Sub RadScheduler1_ResourcesPopulating(ByVal sender As Object, ByVal e As Telerik.Web.UI.ResourcesPopulatingEventArgs)
Dim myInfo As New CustomSchedulerInfo
myInfo.UserID = 1234
e.SchedulerInfo = myInfo
End Sub
Setting breakpoints shows ResourcePopulating firing before the web method call to GetResources.
<WebMethod()> _
Public Function GetResources(ByVal schedulerInfo As CustomSchedulerInfo) As IEnumerable(Of ResourceData)
Return Controller.GetResources(schedulerInfo)
End Function
When I set a breakpoint in GetResources and evaluate schedulerInfo, schedulerInfo.UserID = 0 (default).
Maybe I'm just missing some setting but it appears as though replacing e.SchedulerInfo is not working -- at least not in VB.
Any suggestions?
So, the web service settings show ResourcePopulationMode="ServerSide". On the page...
Protected Sub RadScheduler1_ResourcesPopulating(ByVal sender As Object, ByVal e As Telerik.Web.UI.ResourcesPopulatingEventArgs)
Dim myInfo As New CustomSchedulerInfo
myInfo.UserID = 1234
e.SchedulerInfo = myInfo
End Sub
Setting breakpoints shows ResourcePopulating firing before the web method call to GetResources.
<WebMethod()> _
Public Function GetResources(ByVal schedulerInfo As CustomSchedulerInfo) As IEnumerable(Of ResourceData)
Return Controller.GetResources(schedulerInfo)
End Function
When I set a breakpoint in GetResources and evaluate schedulerInfo, schedulerInfo.UserID = 0 (default).
Maybe I'm just missing some setting but it appears as though replacing e.SchedulerInfo is not working -- at least not in VB.
Any suggestions?