Getting value out of treenode

BudjeBudje Member Posts: 5
edited 2006-05-09 in Dynamics AX
Hi I created a treeview in X++.

I used a formtreedatasource like this:

SerComTree = new FormTreeDatasource(this,element.control (control::mytree),
fieldnum(MCS_ServiceComponents,SerComID),
fieldnum(MCS_ServiceComponents,SerComParentID),
fieldnum(MCS_ServiceComponents,name)
);

The treeview gets populated just fine.
Next I declare a treeItem and initialise it with one of the nodes.

Formtreeitem TreeItem;
;
TreeItem = mytree.getitem(n);

I now want to print the value (serComID see above).
But I can't get it. Only the name with treeitem.text();
treeitem.idx gives me another Id (don't know where it comes from)

How can I retrieve my value(serComID)??????
Sign In or Register to comment.