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

Appointments not sorted

6 Answers 65 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
ekc ekc
Top achievements
Rank 1
ekc ekc asked on 23 Jun 2010, 11:55 AM
Hi,

I have a radScheduler and the data is bind from a dataset. I cant seems to sort the appointments. For example, 1st June i have 3 appointments (a, b, c) and i want it to sort as a, b and c. and in 2nd June, i have same set of appointments (a, b, c), but it's cant be sorted. how can i sort the appointments? Im using version 2008Q1.


Regards.

6 Answers, 1 is accepted

Sort by
0
ekc ekc
Top achievements
Rank 1
answered on 24 Jun 2010, 08:22 AM
anybody know how?
0
Peter
Telerik team
answered on 24 Jun 2010, 04:11 PM
Hello ekc ,

Please, see this forum post which shows how to sort appointments by a custom attribute. You can easily tweak the code to sort by Subject:



class CustomAppointmentComparer : IComparer<Appointment> 
    
        public int Compare(Appointment first, Appointment second) 
        
            if (first == null || second == null
            
                throw new InvalidOperationException("Can't compare null object(s)."); 
            
    
            if (first.Start < second.Start) 
            
                return -1; 
            
    
            if (first.Start > second.Start) 
            
                return 1; 
            
    
            if (first.End > second.End) 
            
                return -1; 
            
            return String.Compare(first.Subject, second.Subject); 
                       return 0; 
        
    
All the best,
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
ekc ekc
Top achievements
Rank 1
answered on 01 Jul 2010, 07:05 AM
my radScheduler don't have AppointmentComparer. im using version 2008Q1.
0
ekc ekc
Top achievements
Rank 1
answered on 01 Jul 2010, 07:10 AM
version 2008.1.619.35 to be exact!
0
ekc ekc
Top achievements
Rank 1
answered on 07 Jul 2010, 05:09 AM
hi Telerik team,

anybody can solve this problem? can be done? yes no?


regards.
0
Veronica
Telerik team
answered on 07 Jul 2010, 07:40 AM
Hello ekc ekc,

Unfortunately AppointmentComparer is valid from Version 2008.3.1314. There is no other way to sort the appointments so recommend you to upgrade to a newer version.

Greetings,
Veronica Milcheva
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
Tags
Scheduler
Asked by
ekc ekc
Top achievements
Rank 1
Answers by
ekc ekc
Top achievements
Rank 1
Peter
Telerik team
Veronica
Telerik team
Share this question
or