Evaluation support > Evaluation Questions

Bound nodes under unbound nodes

(1/2) > >>

Simon: [Edit]
I was wondering, if its possible to create some parent nodes in the tree, and then for all the sub-nodes of the parent, bind them to a datatable/IBindingList?

So, for example:

Parent (unbound)
-Child1 (bound)
-Child2 (bound)
Parent2 (unbound)
...etc

Ruslan:
If your data source doesn`t contain root rows but only children then no, Flexible TreeView doesn`t support this. But if your data source contains root rows but you want disable update them from the tree and enable edit only children rows then this`s possible.
Please describe your situation.

Simon: [Edit]
Thanks for the quick response.

Ive actually decided against my original thinking, opting to populate the treeview manually from the database. This way it gives me more flexibility.

On an unrelated topic, i would like to know, is if there is any event for a NodeControl (NodeTextBox) that provides the following functionality:

Code: [Select]>>>>string GetNodeText(object sender, NodeDataObject Data)
{
 //provide conditional formatting for the TextControl
  NodeEx node = (NodeEx)Data;
  switch(node.Type)
{
  case 1:return node.Property1;
  case 2:return node.Property2;
etc...
}
}<<<<

Ruslan:
That`s called node control virtual mode. Please read this topic ('Virtual data mode' section) for details. You need to enable the nodeControl.VirtulMode bool property, subscribe to the treeview NodeControlValueGet event and return node control value from there according to the pArgs.Node value.

Simon: [Edit]
Wonderful.

I must say as i am getting deeper and deeper i am liking it more and more.
The only thing i could complain about (and im being picky here) is the lack of a simple "getting started" sample project (as I have seen from another post on here and i know your working on it).
I can see the sample provided is really comprehensive, but the main drawback i feel is the inheritance and interfacing throughout it, which subtracts from the novice new user -it took me a while to simply add nodes and show text coming from the standard treeview.

But, to cancel that out the feature list is superb, and i must say im sure there is a way to do pratically anything with Flexible Treeview.

Thanks again for the prompt reply.

Navigation

[0] Message Index

[#] Next page

Reply