Categories | Question details Back To List | ||
dhtmlxScheduler - Event aligment Hello, I'm working with dhtmlxScheduler and i have question - is it posssible to change inline order of events via API. Currently all events are automacily aligned to left margin order by begin date. Is posiible to place event with with for example important/high prioryty always as first (on left side), and then others (also is they started before important task). Answer posted by Stanislav (support) on Oct 09, 2009 06:04 Can be done only by code modification. You can locate next code lines ( originally stored in the event.js ) scheduler._pre_render_events_line=function(evs,hold){ evs.sort(function(a,b){ return a.start_date>b.start_date?1:-1; }) The sorting order defines order in which events will be placed on view. You can change it as evs.sort(function(a,b){ if (a.priority > b.priority) return 1; if (a.priority < b.priority) return -1; return a.start_date>b.start_date?1:-1; }) |