Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
WinSchedule performance issues

I have been using WinSchedule (or rather UltraCalendarInfo, UltraMonthViewSingle etc) in my application for some time and as such the number of appointments has grown massively as I automatically create entries in the database - I am using it as more of an 'event' log than a scheduler I guess.  My problem is that I load all of the appointments from the database in 1q go and pass to the Scheduler which was fine originally but now is very slow as I have many hundreds if not thousands of events in some cases.  What I really need in the ability to just load the events which need to be displayed i.e. what will be shown on screen but I can't see any advice / suggestions as to how this could be done...

No Data
  • 6120
    Offline posted

    Hi Chris,

    You can load only the appointments that needs to be displayed, by selecting the visible date range. You can set the selected date range to visible days within the scroll area by doing something like below in the AfterScroll event:

       private void ultraMonthViewSingle1_AfterScroll(object sender, AfterScrollEventArgs e)
                // Get a reference to the day that contains the indicator that was clicked
                Infragistics.Win.UltraWinSchedule.Day firstDay = this.ultraMonthViewSingle1.FirstVisibleDay;

                // Activate the day that contains the indicator that was clicked
                this.ultraCalendarInfo1.ActiveDay = firstDay;

                DateTime beginDate = firstDay.Date;
                DateTime endDate = beginDate.AddDays(this.ultraMonthViewSingle1.VisibleWeeks * 7);

               //Set the SelectedDateRange to visible date range.
                this.ultraCalendarInfo1.SelectedDateRanges.Add(beginDate, endDate);

    Once you get the required range of dates then you can load the appointments within that range from database.

    Please let me know if I may be of further assistance.

    Sahaja Kokkalagadda
    Associate Software Developer

No Data