Hello Telerik,
So far we have been having a difficult time developing the RadTreeView using server-side coding and data. We have a single table with 3 fields that help define the tree/levels and our internal structure for the application. We want the TreeView to be only postbacked with AJAX on a button click. The TreeView should send back all nodes to the code, which includes new/renamed/reorder nodes. The 3 fields are
NodeLevel - this starts at 1 and ends and the last node in the tree (just a counter of all the node entries - in order of the tree node collection)
NodeLevelUnder - this is a parent to the node - points to the NodeLevel field number
NodeLevelDepth - this is the depth of the node - level deep
Data (NodeLevel, ..Under, ...Depth):
Fruit 1, 0, 0
Apples 2, 1, 1
Granny Smith 3, 2, 2
Greenish Hue 4, 2, 2
Bananas 5, 1, 1
Dole 6, 5, 2
Hawaii 7, 6, 3
Brazil 8, 6, 3
Frozen 9, 5, 2
Veggies 10, 0, 0
Lettuce 11, 10, 1
Peas 12, 10, 1
Sugar Snap 13, 12, 2
Green Pod 14, 12, 2
Well good news is we can get most of this edited nodes, levels, but not the parents id. Using "ClientOperation" of the RadTreeNode in the TreeNode.ClientChanges we can not determine who the parent is of a node that has been added. The GetAllNodes() collecton DOES NOT include the new nodes in the count. We have no idea where it has been added or added and moved. If a old node has a new Parent we need to get that LevelId and put it in the NodeLevelUnder field. The same with a new node that is under a new parent, the index will not reflect the total indexes in the Tree itself, because they are not included in the GetAllNodes() count.
Are we really out of luck trying to accomplish this on the server-side coding? We went through your example here:
http://www.telerik.com/help/aspnet-ajax/treeview-server-save-made-changes-to-treeview-to-database.html
...but you know it really doesnt show real helpful example. It doesnt explain the track/commit at all and really who is just editing node text and reording them, deleting and adding are key features that should have more attention, at least from our stand point.
Please tell me there is a way to accomplish getting the RadTree back as a whole and iterate through ALL nodes as they appear on the web page? If we cant, then we are defaulted to use custom attributes on the cilent-side for all the user changes and persist them back to the server-side. Will this work? We would have to change out our server-side code and fill in the 3 custom attributes, everytime the client reorders, add, edits, etc., or maybe jsut fill them in once when they click the button to save.
Thanks for the help here
SDI
So far we have been having a difficult time developing the RadTreeView using server-side coding and data. We have a single table with 3 fields that help define the tree/levels and our internal structure for the application. We want the TreeView to be only postbacked with AJAX on a button click. The TreeView should send back all nodes to the code, which includes new/renamed/reorder nodes. The 3 fields are
NodeLevel - this starts at 1 and ends and the last node in the tree (just a counter of all the node entries - in order of the tree node collection)
NodeLevelUnder - this is a parent to the node - points to the NodeLevel field number
NodeLevelDepth - this is the depth of the node - level deep
Data (NodeLevel, ..Under, ...Depth):
Fruit 1, 0, 0
Apples 2, 1, 1
Granny Smith 3, 2, 2
Greenish Hue 4, 2, 2
Bananas 5, 1, 1
Dole 6, 5, 2
Hawaii 7, 6, 3
Brazil 8, 6, 3
Frozen 9, 5, 2
Veggies 10, 0, 0
Lettuce 11, 10, 1
Peas 12, 10, 1
Sugar Snap 13, 12, 2
Green Pod 14, 12, 2
Well good news is we can get most of this edited nodes, levels, but not the parents id. Using "ClientOperation" of the RadTreeNode in the TreeNode.ClientChanges we can not determine who the parent is of a node that has been added. The GetAllNodes() collecton DOES NOT include the new nodes in the count. We have no idea where it has been added or added and moved. If a old node has a new Parent we need to get that LevelId and put it in the NodeLevelUnder field. The same with a new node that is under a new parent, the index will not reflect the total indexes in the Tree itself, because they are not included in the GetAllNodes() count.
Are we really out of luck trying to accomplish this on the server-side coding? We went through your example here:
http://www.telerik.com/help/aspnet-ajax/treeview-server-save-made-changes-to-treeview-to-database.html
...but you know it really doesnt show real helpful example. It doesnt explain the track/commit at all and really who is just editing node text and reording them, deleting and adding are key features that should have more attention, at least from our stand point.
Please tell me there is a way to accomplish getting the RadTree back as a whole and iterate through ALL nodes as they appear on the web page? If we cant, then we are defaulted to use custom attributes on the cilent-side for all the user changes and persist them back to the server-side. Will this work? We would have to change out our server-side code and fill in the 3 custom attributes, everytime the client reorders, add, edits, etc., or maybe jsut fill them in once when they click the button to save.
Thanks for the help here
SDI