Sort order of automatic row height demo
3 posts
• Page 1 of 1
Sort order of automatic row height demo
I have implemented a schedule panel with variable row height for overlapping events like in this demo: http://bryntum.com/playpen/rowheight-gr ... eight.html
What is not clear to me is the sort order logic and how to change it. Can I specify the attribute to sort by within a single row?
In my particular case there are several overlapping events starting at the same time for example.
Is it possible to retrieve the order when the event is moved up or down. Then I would like to store its position and place the events again in the same order after reloading the event store.
What is not clear to me is the sort order logic and how to change it. Can I specify the attribute to sort by within a single row?
In my particular case there are several overlapping events starting at the same time for example.
Is it possible to retrieve the order when the event is moved up or down. Then I would like to store its position and place the events again in the same order after reloading the event store.
- georepublic
- Posts: 2
- Joined: Thu Jun 09, 2011 8:04 am
Re: Sort order of automatic row height demo
If you read the source, you'll know....
Just override this method:
- Code: Select all
sortMethod: function (a, b) {
var sameStart = (a.start - b.start === 0);
if (sameStart) {
return (a.text || '') < (b.text || '') ? -1 : 1;
} else {
return (a.start < b.start) ? -1 : 1;
}
},
We're hiring! We have an open position for an experienced Sencha developer (Ext JS and/or Sencha Touch). Contact us at jobs@bryntum.com
Follow us on Twitter: @bryntum or Facebook
Need professional services or training? Read more here.
API documentation
Follow us on Twitter: @bryntum or Facebook
Need professional services or training? Read more here.
API documentation
-

mats - Core Developer

- Posts: 7057
- Joined: Sat Dec 19, 2009 11:41 pm
- Location: Sweden
Re: Sort order of automatic row height demo
Thank you!
Indeed, when you know where to search for it's not difficult.
Indeed, when you know where to search for it's not difficult.
- georepublic
- Posts: 2
- Joined: Thu Jun 09, 2011 8:04 am
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests