Hi there,
I have a resourceStore that I want to sort by a custom number (called "resourceOrder" in my database/array). I have the following code:
resourceStore : {
readUrl : 'php/schedule/resource/read.php',
sorters : [{ field: 'resourceOrder', ascending: true }, { field: 'name', ascending: true}],
...
}
This seemed to work fine (when using <10 resources), however, today I found out that when using more than 10 resources, for example 14 (numbered from 1 to 14), it sorts in the following way:
1
10
11
12
13
14
2
3
4
etc.
It seems to sort the number "alphabetically"
How can I tell scheduler to treat the "resourceOrder" field as an integer/number when sorting on it?
NotE: I realise I can divert to numbering like this: 001, 002, 003, or A, B, C etc. but this is not an ideal solution, because the resourceOrder is numeric in other parts of my (server-sided) code.
Thanks for the help!
Laurens