Using AppointmentComparer to Sort

4 posts, 0 answers
  1. TPerry
    TPerry avatar
    47 posts
    Member since:
    Jul 2006

    Posted 16 Apr 2014 Link to this post

    I have a Scheduler that only displays All Day appointments and I'm using the AppointmentComparer to sort the entries based on Description.  This works great when the scheduler intially loads in the Month View.  But when I switch it to the Week view, the Appointments are not sorted correctly.  If I switch it back to the Month view, they are again in the incorrect order.  But if I load the page again, the appointments are sorted correctly.  The AppointmentComparer is called only on the initial load and not when I switch to the Week or Day or Month.  How can I call the AppointmentComparer when I switch Views?
  2. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 18 Apr 2014 Link to this post

    Hello TPerry,

    I have tried to replicate the issue both locally and on our on-line demos but to no avail. Here is a video of my test. Would you please elaborate a little bit if I have to test it in a different way and share the exact steps to achieve it so we could inspect the issue one again and be more helpful with a possible solution.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. TPerry
    TPerry avatar
    47 posts
    Member since:
    Jul 2006

    Posted 21 Apr 2014 in reply to Plamen Link to this post

    Hi Plamen - both of your links shoot me to a page about Reminders??  Let me see if I can narrow down the problem.  I have a page with a Scheduler that is populated in the codebehind.  The Sub that populates it is called on PageLoad as well as when a Combobox is changed.  (I do have an Ajax Manager that updates the Scheduler when the ComboBox or the Scheduler is changed.)  Also in that code, I call the AppointmentComparer which sorts the entries.  This all works great, until I switch to Week or Day view.  The AppointmentComparer is not called (since the calendar does not need to be bound again), so the entries are no longer sorted the way I need them to be.

    Code Behind Sub:
    'Bind the Calendar
    Me.RadScheduler1.DataSource = AttendanceBRL.EntityClasses.Calendar.GetCalendarData(IsRollUp, ID, Type, UniqueUserID)
    Me.RadScheduler1.DataBind()

    'Sort it
    RadScheduler1.AppointmentComparer = New AttendanceBRL.BasePage.CustomAppointmentComparer("Description", SortDirection.Ascending)

    Does that shed a little more light?
  5. Plamen
    Admin
    Plamen avatar
    2733 posts

    Posted 23 Apr 2014 Link to this post

    Hi TPerry,

    Thank you for getting back to us and elaborating the issue.

    The scenario seems quite specific and observe only in your custom case. Generally when using the AppointmentComparer we recommend using it as it is described in this forum thread in PageLoad. If in your case you are using it in a different way please share all the code connected to RadScheduler that is sued so we could inspect the issue and be more helpful.

    Regards,
    Plamen
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top