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

RadScheduler - Year View - Mouseover

3 Answers 30 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Jae Hong
Top achievements
Rank 1
Jae Hong asked on 05 Dec 2016, 09:08 PM

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

 

3 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 08 Dec 2016, 08:08 AM
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.
0
Jae Hong
Top achievements
Rank 1
answered on 08 Dec 2016, 01:40 PM

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.

0
Plamen
Telerik team
answered on 13 Dec 2016, 02:22 PM
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.
Tags
Scheduler
Asked by
Jae Hong
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Jae Hong
Top achievements
Rank 1
Share this question
or