DBTreeView

Hi everybody,

i also would like to ask how to do with my requirement.

i use the following code to get treeview in servoy like following.

//search the root node(s)
controller.find();

country_id =‘^’;

//controller.search();
controller.search(false, true);

////set the root node(s) and set the name of dataprovider to use for text display on a node
elements.dbtreeview.setRoots(foundset, “country_id”);

======================================

-1
+2
+3
-4
+5
+6

but now i would like to construct my treeview not only with id field, also i would like to show id-description in the treeview like the following.

-1_AAA
+2_BBB
+3_CCC
-4_DDD
+5_EEE
+6_FFF

could you pls help me to solve my problems.

Thanks

Dennis

Create a (unstored) calculation returning id-description and use that as the dataprovider for the node text.

Paul

Hi pbakker,

Big Thanks, its working!!!

:D really thanks pbakker.

Cheer

Dennis

hi pbakker,

Now i would like to change my DBTreeview to updated version.

according to the following article.

setRoots(foundset,field/calculation name) method is no more support in the new version.

but addRoots(foundset) is support instead of setRoots() method in the new version.

so how do i put id-description with new version of DBTreeview?

pls help me

Thanks

Dennis

hi pbakker,

i the problem is solve already.

this time i use setTextDataprovider method.

that method can be use calculation value also.

Thanks

Dennis