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

Hovering in scheduler is laggy

7 Answers 87 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Larevenge
Top achievements
Rank 1
Larevenge asked on 10 Nov 2010, 12:23 PM
Hello,

At the moment i have a scheduler inplemented in my application. I made it exactly as in the examples is described. The problem is at the moment, that when there are appointments on the overview, pointing to different timeslots is workign kinda laggy and slow. it takes a while before it lights up the timeslot of one hour where i have my mouse on it. I searched the Telerik forum, for performance problems and im already using the radscriptmanager as well the radstylesheetmanager.

My code is below:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucQuickPlan.ascx.cs"
    Inherits="VEGAS_HPF.Hoofdmenu.Agenda.ucQuickPlan" %>
<%@ Register Src="AdvancedForm.ascx" TagName="AdvancedForm" TagPrefix="scheduler" %>
<style type="text/css">
    .RadScheduler .rsAptSubject
    {
        text-align: left;
        padding: 4px 0 1px;
        margin: 0 0 3px;
        font-size: 12px;
        font-weight: bold;
        color: #369;
        height: 17px;
        border-bottom: 1px solid #99DEFD;
        width: 100%;
    }
    .RadScheduler .rsAdvancedEdit .RadColorPicker label
    {
        text-align: left;
        display: block;
        padding: 0;
    }
</style>
  
<script type="text/javascript">
    //<![CDATA[
  
    // Dictionary containing the advanced template client object
    // for a given RadScheduler instance (the control ID is used as key).
    var schedulerTemplates = {};
  
    function schedulerFormCreated(scheduler, eventArgs) {
        // Create a client-side object only for the advanced templates
        var mode = eventArgs.get_mode();
        if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                    mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
            // Initialize the client-side object for the advanced form
            var formElement = eventArgs.get_formElement();
            var templateKey = scheduler.get_id() + "_" + mode;
            var advancedTemplate = schedulerTemplates[templateKey];
            if (!advancedTemplate) {
                // Initialize the template for this RadScheduler instance
                // and cache it in the schedulerTemplates dictionary
                var schedulerElement = scheduler.get_element();
                var isModal = scheduler.get_advancedFormSettings().modal;
                advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
                advancedTemplate.initialize();
  
                schedulerTemplates[templateKey] = advancedTemplate;
  
                // Remove the template object from the dictionary on dispose.
                scheduler.add_disposing(function() {
                    schedulerTemplates[templateKey] = null;
                });
            }
  
            // Are we using Web Service data binding?
            if (!scheduler.get_webServiceSettings().get_isEmpty()) {
                // Populate the form with the appointment data
                var apt = eventArgs.get_appointment();
                var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
                advancedTemplate.populate(apt, isInsert);
            }
        }
    }
  
    //]]>
</script>
  
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" OnDataBound="RadScheduler1_DataBound"
    OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OnClientFormCreated="schedulerFormCreated"
   EnableDescriptionField="true" AppointmentStyleMode="Default"
    OnDataBinding="RadScheduler1_DataBinding" ayStartTime="08:00:00" DayEndTime="22:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="22:00:00"
    FirstDayOfWeek="Monday" LastDayOfWeek="Friday" HoursPanelTimeFormat="HH:mm" Height="100%"
    ShowViewTabs="false" Skin="Telerik" StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true">
    <AdvancedForm Modal="false" />
    <AdvancedEditTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
            Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
            UserID='<%# Bind("intPersoneelID") %>' RoomID='<%# Bind("intKamerID") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
            Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
            UserID='<%# Bind("intPersoneelID") %>' RoomID='<%# Bind("intKamerID") %>' />
    </AdvancedInsertTemplate>
    <TimelineView UserSelectable="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

And the code behind:

public partial class ucQuickPlan : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //RadScheduler1.ResourceTypes.Add(new ResourceType("User"));
            //RadScheduler1.Resources.Add(new Resource("User", "22", "Alex"));
            //RadScheduler1.Resources.Add(new Resource("User", "24", "Bob"));
  
        }
  
        protected void RadScheduler1_DataBinding(object sender, EventArgs e)
        {
  
  
            string strDateSelected = RadScheduler1.SelectedDate.ToShortDateString();
            //RadScheduler1.DataSource = Agenda_cls.GetAgendaItems(intPersoneelID, strDateSelected);
            RadScheduler1.DataKeyField = "id";
            RadScheduler1.DataStartField = "afspraakdatum";
            RadScheduler1.DataEndField = "afspraakdatumEind";
            RadScheduler1.DataSubjectField = "afspraakopmerkingen";
            //RadScheduler1.GroupBy = "adviseur_id";
            RadScheduler1.GroupingDirection = GroupingDirection.Horizontal;
  
            RadScheduler1.DataSource = cls_VEGAS_HPF.getDataset("exec sp_getAgendaItems", "ConnWB");
  
            RadScheduler1.ResourceTypes.Clear();
  
            DataTable dt_Adviseurs = cls_VEGAS_HPF.getDataTable("Exec sp_HypGetAdviseursInDienst", "ConnHPF");
  
            ResourceType restype1 = new ResourceType("Adviseur");
            restype1.DataSource = dt_Adviseurs;
            restype1.KeyField = "intPersoneelID";
            restype1.TextField = "strNaam";
            restype1.ForeignKeyField = "intPersoneelID";
            RadScheduler1.ResourceTypes.Add(restype1);
  
            DataTable dt_Kamers = cls_VEGAS_HPF.getDataTable("SELECT * FROM tblDLocatieKamer", "ConnHPF");
  
            ResourceType restype2 = new ResourceType("Kamer");
            restype2.DataSource = dt_Kamers;
            restype2.KeyField = "intKamerID";
            restype2.TextField = "strKamerNaam";
            restype2.ForeignKeyField = "intKamerID";
            RadScheduler1.ResourceTypes.Add(restype2);
  
            RadScheduler1.GroupBy = "Adviseur";
        }
  
        protected void RadScheduler1_DataBound(object sender, EventArgs e)
        {
            //RadScheduler1.ResourceTypes.FindByName("User").AllowMultipleValues = true;
            //RadScheduler1.ResourceTypes.FindByName("Room").AllowMultipleValues = false;
        }
  
        protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
            string colorAttribute = e.Appointment.Attributes["AppointmentColor"];
            if (!string.IsNullOrEmpty(colorAttribute))
            {
                int colorValue;
                if (int.TryParse(colorAttribute, out colorValue))
                {
                    Color appointmentColor = Color.FromArgb(colorValue);
                    e.Appointment.BackColor = appointmentColor;
                    e.Appointment.BorderColor = Color.Black;
                    e.Appointment.BorderStyle = BorderStyle.Solid;
                    e.Appointment.BorderWidth = Unit.Pixel(1);
                }
            }
            e.Appointment.ToolTip = e.Appointment.Subject + ": " + e.Appointment.Description;
        }
    }

Any help is much appriciated.

Regards,

Corné

7 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 11 Nov 2010, 03:20 PM
Hello Corné,

Do you experience this problem only for a specific browser? If yes, please tell us the browser that you test your application with and if possible send us a live url of the problem.


Greetings,
Peter
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
0
Larevenge
Top achievements
Rank 1
answered on 11 Nov 2010, 04:04 PM
Hello Peter,

Yes it is in a specific browser, in Internet Explorer, in Firefox and Chrome its working very fast. However i develop for Internet Explorer(tried several computers all latest version of ie explorer 8.0.7600.16385) they all have the same problem. Unfortanately i can't give a link to the application, since its prohibited for domain use.

Regards,

Corné
0
Peter
Telerik team
answered on 16 Nov 2010, 05:34 PM
Hello Corné,

I have searched for similar problem in the forums and found the following related post which will shed more light:

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/why-does-telerik-perform-terrible-with-ie.aspx#1229880


Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Larevenge
Top achievements
Rank 1
answered on 17 Nov 2010, 03:46 PM
Hello Peter,

The link you gave me, might be true. However, it seems to me the problem is not exactly in the scheduler itself, but in the appointment. Because when i have appointments in my selected day, it starts working enormously slow. When there aren't appointments in the selected day view, it works acceptable fast. It has also nothing to do with how many appointments there are in the Scheduler, since when i have no appointments in the selected day view, there are appointments in the scheduler itself since i load ,during my test fase, all the appointments which i have in the table.

Still, a Telerik employee stated there that they would fix it, what is the status of that since i don't see it in the overview of upcoming fixes as well?

Regards,

Corné
0
Peter
Telerik team
answered on 22 Nov 2010, 01:22 PM
Hello Corné,

We haven't done any improvements towards that direction since the post in the forum, but we are aware of this issue and we are currently researching for any possible optimizations. Please, accept our apologies for any inconvenience caused.



Regards,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Larevenge
Top achievements
Rank 1
answered on 22 Nov 2010, 02:52 PM
Hey Peter,

It might be usefull to know, that this problem only exists when i have the groupby property on.

Since i use the scheduler on different ways, and this way to plan appointments, i really need it, when i turn groupby off, the lagging stops, however i can't since they need it for the view :)
0
Peter
Telerik team
answered on 23 Nov 2010, 07:02 PM
Hi Corné,

Thank you for sharing your findings. We will have this in mind when investigating the issue.

Greetings,
Peter
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Scheduler
Asked by
Larevenge
Top achievements
Rank 1
Answers by
Peter
Telerik team
Larevenge
Top achievements
Rank 1
Share this question
or