|
Rank: Advanced Member Groups: Member
Joined: 11/12/2008 Posts: 42
|
I populate my treeview with a nested dataset...
in this table i have the columns: ID, Parent, Child, Text, Order
Parent and Child columns are nested...
in the sql query string i order by Parent, Order to get it on the right order...
I intend to use the Drag&Drop reordering function... But my doubts are: 1) The treeview recognizes thhe Order field as the ordering??? How do I set it?? 2) Does the treeview auto-update the database with the new order?
tks, christiano.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
Thanks for posting in the forum. As to your question:
1. The TreeView takes the data source you give to it as is. It does not perform any kind of ordering. So if you wish to order the nodes, you will need to order it in your DataSet before you give it to the TreeView;
2. The TreeView does not update your database with the new order. It fires NodeMoved event. You should handle that event to update your database;
Hope this helps.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 11/12/2008 Posts: 42
|
tks a lot.. that gave a light..
but i'm facing a new condition.... i'm doing tests on the demo version, yet...
i'm not able to handle the itemmoved event without the license???
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
NodeMoved event is a delayed event, which means it is not fired until the page posts back. It is similar to the Change event of a TextBox control. The event does not fire immediately after user changed the text, rather it is fired after the page is being posted back.
You can try to put a standard button in the page, move a node, then click the button to cause a post back. This should fire NodeMoved event.
The trial version displays a license warning message and eventually expires, but it does not have any feature restrictions.
Thanks!
|
|
Rank: Advanced Member Groups: Member
Joined: 11/12/2008 Posts: 42
|
sorry... i hadn't realized that the component had been setted to not raise server events...
shame on me.. lol...
|
|