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

Datasource.sort() behavior inconsistent across browsers

3 Answers 127 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Kyle
Top achievements
Rank 1
Kyle asked on 03 Feb 2017, 01:50 PM

When I specify sort fields via the datasource.sort() option, the result is different in Chrome than it is in IE.

In IE, multiple all-day events in the same day appear sorted correctly on the calendar.  In chrome, the same events render *slightly* out of order.

In both browsers, printing that set of events to the console reveals that the datasource itself is sorted correctly in both browsers, but it appears the calendar control does not render them in the specified order, in Chrome.

I've included screenshots of my data in Chrome...

1) my sort configuration

2) the day's data, sorted, printed to the console

3) the day's data, sorted, rendered on the calendar

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 07 Feb 2017, 09:12 AM
Hello Kyle,

The reason for the different results from sorting the events is that the Chrome use sort algorithm that is not guaranteed to be stable. For more information you can check the following help article which is applicable for any widget using the dataSource:

Also please note that the Scheduler currently does not support preserving the sort order of the events provided by the dataSource.

Regards,
Vladimir Iliev
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.
0
Kyle
Top achievements
Rank 1
answered on 23 Feb 2017, 08:58 PM

Your linked article doesn't seem to apply to the kendoGrid widget.  From what I can see, the Scheduler does not have a "columns" attribute or a "sortable" attribute that would allow me to implement stable sorting via a _position field...

Do I need to add a "position" field to items in my dataSource and use that as my only value in my dataSource.sort() configuration?

0
Veselin Tsvetanov
Telerik team
answered on 27 Feb 2017, 01:49 PM
Hi Kyle,

Currently the Scheduler widget does not offer support for custom sorting of events. As you correctly noticed, even if its dataSource is sorted, the widget renders the events in different order, depending on the browser used.

Some further details and a suggested workaround for this case are discussed in the following forum thread. If you think, that the discussed custom sorting feature should be added to the core functionality of the widget, you could vote for the following suggestion in our Feedback portal.

Regards,
Veselin Tsvetanov
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
Kyle
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Kyle
Top achievements
Rank 1
Veselin Tsvetanov
Telerik team
Share this question
or