Try sorting default order
column.
Hello,
Gantt uses task properties to sort tasks. The tasks in the snippet have “undefined” values:
http://snippet.dhtmlx.com/8d566906d
That’s why Gantt doesn’t sort the tasks.
The function you use only affects the displayed value, it doesn’t affect tasks.
You need to add the values to the tasks to sort them:
gantt.eachTask(function(task){
task.default_order = Math.floor(Math.random()*(100-1+1)+1);
gantt.updateTask(task.id);
})
http://snippet.dhtmlx.com/24cb8914f
Or you can sort the column using the values from another column. To do that, add sort: 'other column name'
property:
http://snippet.dhtmlx.com/b838251a8