Welcome Guest Search | Active Topics | Sign In | Register

Treeview reordering :: how to set the initial order??? Options
Christiano
Posted: Friday, November 28, 2008 4:27:16 PM
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.
eo_support
Posted: Friday, November 28, 2008 5:38:23 PM
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!
Christiano
Posted: Saturday, November 29, 2008 9:08:09 AM
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???

eo_support
Posted: Saturday, November 29, 2008 9:40:40 AM
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!
Christiano
Posted: Saturday, November 29, 2008 9:47:40 AM
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...



You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.