Our pure JavaScript Scheduler component


Post by henrikbackman »

Hi,

Is there a way to do custom sorting? I have data that is an object or objects in an array. Can I somehow specify what string (inside the object) the sorter should do the sorting on?

I've tried to look trough the docs and even tried to configure an example but couldn't get it to work.

Thank

Post by johan.isaksson »

Hi,

You should be able to achieve it using a custom sorter fn, can be configured on the column:

https://www.bryntum.com/docs/grid/#Grid ... g-sortable

Or give a fn to Store#sort:

https://www.bryntum.com/docs/grid/#Comm ... ction-sort
Best regards,
Johan Isaksson

Post by henrikbackman »

I've tried the first option. That didn't work. The sorting was way off. I'll have to take a look at the second option.

Post by johan.isaksson »

They both end up at the same place in the end. If you could share some code perhaps we can give you some pointers?
Best regards,
Johan Isaksson

Post by henrikbackman »

I've sent you a private message with the data.

Post Reply