RadScheduler - Year View - Mouseover

4 posts, 0 answers
  1. Jae Hong
    Jae Hong avatar
    5 posts
    Member since:
    May 2012

    Posted 05 Dec 2016 Link to this post

    Hi there,

    I added RadScheduler Telerik Scenario with "Web Service with Custom Provider" option, and then added "Year View".

    Everything works fine except an error message when I mouse over on the appointment cell. I debugged and noticed that embed tooltip on year view does not initialize custom schedulerInfo. Is there a way to override client event and initialize schedulerInfo ???

    Here are codes:

    <script type="text/javascript">
     
        var teacherID = "all";
     
        function OnClientSelectedIndexChanged(sender, args) {
            teacherID = args.get_item().get_value();
            var scheduler = $find('<%=RadScheduler1.ClientID %>');
            scheduler.rebind();
        }
     
        function OnClientAppointmentsPopulating(sender, eventArgs) {
            eventArgs.get_schedulerInfo().TeacherID = teacherID;
        }
    </script>

     

    <telerik:RadScheduler ID="RadScheduler1" runat="server" OnClientAppointmentsPopulating="OnClientAppointmentsPopulating"
            AppointmentStyleMode="Default" SelectedView="MonthView" SelectedDate="2011-01-21"
            Width="100%" OverflowBehavior="Expand">
            <DayView UserSelectable="true" />
            <MonthView UserSelectable="true" />
            <YearView UserSelectable="true" />
            <WeekView UserSelectable="false" />
            <TimelineView UserSelectable="false" />
            <WebServiceSettings Path="SchedulerWebService.asmx" ResourcePopulationMode="ServerSide"  />
            <ResourceStyles>
                <telerik:ResourceStyleMapping Type="Teacher" Key="1" BackColor="Orange" />
                <telerik:ResourceStyleMapping Type="Teacher" Key="2" BackColor="Aqua" />
            </ResourceStyles>
        </telerik:RadScheduler>

     

    Public Overrides Function GetAppointments(ByVal shedulerInfo As ISchedulerInfo) As IEnumerable(Of Appointment)
            Dim myInfo = TryCast(shedulerInfo, MySchedulerInfo)
            Dim teacherID As String = myInfo.TeacherID
    '--> teacherID gets nothing when mouse over appointment in year view.
            Dim appointments As New List(Of Appointment)()

     

    Thanks.

    Jae

     

  2. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 08 Dec 2016 Link to this post

    Hi,

    We are not aware of such general  issue in RadScheduler control. Similar error is usually observed when some data is not loaded correctly by the service. You may test how it works in the default  web service scenario where the error was not observed at my side.

    Regards,
    Plamen
    Telerik by Progress
    Telerik UI for ASP.NET AJAX is ready for Visual Studio 2017 RC! Learn more.
  3. Jae Hong
    Jae Hong avatar
    5 posts
    Member since:
    May 2012

    Posted 08 Dec 2016 in reply to Jae Hong Link to this post

    Please test RadScheduler scenario - Web Service with Custom Provider. I loaded it and allowed Year View to 'True' and mouse hover any appointment in the year view date cell. This never go through client 'OnClientAppointmentsPopulating' event so even your scenario pops up the error.

  4. Plamen
    Admin
    Plamen avatar
    2959 posts

    Posted 13 Dec 2016 Link to this post

    Hi,

    It seems like you are trying to load only the events that are populated with some resource. Yet this functionality is not implemented in the Year View of the control. That is why I would recommend you remove this code (or a similar one from your provider because the resource is not passed in this case :
    cmd.CommandText += "WHERE TeacherID = " + teacherID

    Regards,
    Plamen
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top