DBTreeView setChildSortDataprovider not working

Questions and answers on developing, deploying and using plugins and JavaBeans

DBTreeView setChildSortDataprovider not working

Postby studiomiazzo » Tue Jan 08, 2013 5:57 pm

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
User avatar
studiomiazzo
 
Posts: 124
Joined: Thu Jun 16, 2011 10:48 am
Location: Novara (IT)

Re: DBTreeView setChildSortDataprovider not working

Postby rgansevles » Mon Jan 21, 2013 10:03 am

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
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: DBTreeView setChildSortDataprovider not working

Postby studiomiazzo » Wed Mar 27, 2013 12:02 pm

rgansevles wrote: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
Code: Select all
function sort_calc()
{
    return 'order asc';
}
User avatar
studiomiazzo
 
Posts: 124
Joined: Thu Jun 16, 2011 10:48 am
Location: Novara (IT)


Return to Plugins and Beans

Who is online

Users browsing this forum: No registered users and 1 guest

cron