DBTreeView setChildSortDataprovider not working

Here you can find the code: http://pastebin.com/enDQ5Tyz

Basically, I’m trying to order a tree. I’ve created the calculation providing the sort order into the table each relation is pointing at, supposing the column name need to belong to the datasource the children’s binding is created on. The fact is, the order is completely ignored.
I’ve read all kind of topics on the forum but I really can’t seem to sort this thing out. Would you help me?

Thanks in advance

Hi,

The setChildSortDataprovider() call does not expect a dataprovider name for the sort, but a dataprovider name that returns the sort for that record.
See http://wiki.servoy.com/display/public/D … taprovider

Also see here viewtopic.php?f=8&t=11742

Rob

rgansevles:
Hi,

The setChildSortDataprovider() call does not expect a dataprovider name for the sort, but a dataprovider name that returns the sort for that record.
See http://wiki.servoy.com/display/public/D … taprovider

Also see here viewtopic.php?f=8&t=11742

Rob

That’s exactly what I provide with the calculation (which I supposed to be a valid dataprovider). Something like

function sort_calc()
{
    return 'order asc';
}