Community & Support
Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Treeview > Client-side add/move/delete node
RadControls for ASP.NET are no longer supported (see this page for reference). In case you have inquiries about the Telerik ASP.NET AJAX controls, post them in the pertinent ASP.NET AJAX forums.

Not answered Client-side add/move/delete node

Feed from this thread
  • Craig Quillen avatar

    Posted on Apr 13, 2006 (permalink)

    How do you add and remove tree nodes on the client side?  I want to do drag and drop purely on the client.

  • Nick Nick admin's avatar

    Posted on Apr 14, 2006 (permalink)


    Hi Craig,

    Thanks for your question.

    Frankly speaking r.a.d.treeview does not provide such a client-side API. Nevertheless, you can accomplish your task by using r.a.d.callback along with r.a.d.treeview. Thus you will achieve the needed client-side experience. Please follow the link below for more details:
    http://www.telerik.com/r.a.d.controls/Controls/Examples/Integration/Callback/TreeView/DefaultCS.aspx 

    Hope this helps.

    Let us know how it goes.

    Sincerely yours,
    Nick
    the telerik team

  • Craig Quillen avatar

    Posted on May 2, 2006 (permalink)

    I have to disagree about this providing the same client experience.  The treeview still has to reload all itself and all it's images every time an node is inserted.  This is very noticable.  Waiting on the images to reload is particularly bad with even a moderate number of nodes.  You can see this behavior even on the sample link you provided.

    It shouldn't be termendously difficult to add, modify, move, and delete nodes via direct HTML DOM manipulation.  Then you would use a callback to notify the server about the change, but the treeview would NOT refresh when the callback completes.

    I was able to do this with the Infragistics tree.  It did require some hacking, but I eventually made it work.  Infragistics irritates me in general, so I really don't want to move back to it, but it's looking like I may have to.   Can you guys help me out here?

  • Nick Nick admin's avatar

    Posted on May 3, 2006 (permalink)


    Hi Craig,

    Thanks for sharing your thoughts with us. We definitely agree that the approach you described will considerably improve the client-side behavior of the treeview control. However, it appears that this is not an easy task to accomplish at this stage. We will continue investigations on the matter and as soon as we have certain results, we will surely implement the features in our r.a.d.treeview.

    Once again, thank you for your involvement.

    Regards,
    Nick
    the telerik team

  • hainkurt avatar

    Posted on Jul 21, 2006 (permalink)

    I need this functionality too... without this treeviev is not suitable for applications that deals with large number of nodes.

    I am using ExpandMode.ServerSideCallBack to load nodes.

    and on Expand event:

    Private Sub RT_NodeExpand(ByVal o As Object, ByVal e As Telerik.WebControls.RadTreeNodeEventArgs) Handles RT.NodeExpand

    Dim folderNode As RadTreeNode = e.NodeClicked
    Dim folder_id As String = folderNode.Value

    folderNode.Nodes.Clear() <--- Nodes = Nothing, no children..., no effect
    BindDoc(folder_id, folderNode.Nodes)
    End Sub

    But when I use this, all nodes are duplicated, they are not cleared! what should I do to refresh the nodes?

    Thanks

  • INACTIVE_Rumen INACTIVE_Rumen admin's avatar

    Posted on Jul 22, 2006 (permalink)

    Hi Huseyin,

    Thanks for the follow-up. Weird thing is, we cannot reproduce the problem. When using ExpandMode.ServerSideCallBack the event handler is fired only once - upon expanding. All subsequent expand/collapse event are handled on the client - no callback to the server and the NodeExpand event is not fired. Hence, we never could reproduce the double loading problem.

    What are we missing?

    Kind regards,
    Elton
    the telerik team

  • hainkurt avatar

    Posted on Jul 24, 2006 (permalink)

    Hi,
    I am using a client side javascript :

    node.Collapse();
    node.ExpandOnServer=2;
    node.ExpandMode = ExpandMode.ServerSide;
    node.Expand();

    after this code, another ServerSideCallBack is triggered. On server, I get the node, but it has no chield on server, so chields are added on server, but when it comes to client all nodes that are added on server apperas on client with the old ones :) Thats why I have to delete the chields before this call. I could manage delete the HTML content under the node, but I could not really delete the chield nodes, I have to understand your javascript first to delete them.

    It should not be so difficult. All we want is:

    clientside:

    node.DeleteChield(index) or
    node.DeleteAllChields()

    then

    node.Refresh() is implemented as

    node.DeleteAllChields()
    node.ExpandOnServer=2
    node.Expand()

    another callback is triggered, new nodes are added and displayed on client correctly... Without this I cannot refresh the nodes. I cannot use serverside calls, or postback, or your ajaxpanel to do this, because tree is very large representing file system on server. All I do is refresh the whole page and display first nodes and wait for the next version, or find another product.

    You should add clientside functions like:

    node.MoveUp()
    node.MoveDown()
    node.DeleteChiled(index)
    node.DeleteAllChileds()
    node.Hide()
    node.Add(newNode)

    etc.

    because for large trees we cannot use any serverside events...

    Thanks...

  • Peter Peter admin's avatar

    Posted on Jul 27, 2006 (permalink)


    Hello Huseyin,

    We understand what functionality you need and we agree that it is useful to have it. However, at this point, the r.a.d.combobox doesn't expose a way to modify the items on the client. We wil work, however, towards achieving this and try to implement a method on the client.



    Sincerely yours,
    Peter
    the telerik team

  • Posted on Apr 20, 2007 (permalink)

    Could you please give me a clear answer: Are you going to include such functionality in the upcoming release we're waiting for now? Or may be in the near future?

    We do need client-side node manipulation. Is it so hard to implement? At least more then two years your customers entreat you to do so.

    Is it possible to code a shortcut method, say RadTreeView.prototype.Add(value, text, category, parentNode)? Just create some data structure like you do in the <tw_ClientID>ClientData array and pass it to RadTreeView.prototype.LoadNode, and create appropriate DOM nodes for the new node afterwards. That's it! Moreover in our case the server-side code should not know anything about these manipulations.

    The move and delete operations seem to be even simpler.

    Look… Taking into account our continuous struggle with RadControls which takes a lot of development efforts, we now consider if we shouldn't use your controls anymore.

    Thank You!

    PS. My account is inactive for some reason. It isn't big deal for me because my team fellow has one and collaborates with your guys. Anyway it would be great to find out what with my account to not bother my friend with my own RadControls realted issues.

  • Nick Nick admin's avatar

    Posted on Apr 21, 2007 (permalink)

    Hi Vadim,

    We completely understand your position on this matter. This feature has been requested by clients before and it has been a hard decision for us when and how exactly to implement it. After lots of discussions we came to the conclusion that a simple implementation of the feature would lead to major obstacles at the customers' side. Some might find the feature useful, however it will not conform to the standard web control programming model and most customers will be confused. Therefore, we decided to take our time and find the best and precise way to implement the feature. The next version of the control will be based on ASP.NET AJAX and we will consider taking the opportunity to implement client-side add/move/delete on top of ASP.NET AJAX.

    As for your account  -I checked our system and it showed that your subscription has expired. The 1 year Support package associated with your developer license has expired. Please, visit My Licenses --> My Upgrades (or My Subscriptions) for upgrade/renewal options.

    Regards,
    Nick
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center

  • Chris Williams avatar

    Posted on Nov 27, 2007 (permalink)

    Just want to add my vote for more client-side support for the tree.  It's a shame that there isn't more support for adding/removing.  Your competitors have better support for this: read.

    Please give this feature more consideration.

    thank you.

  • Atanas Korchev Atanas Korchev admin's avatar

    Posted on Nov 28, 2007 (permalink)

    Hi Chris Williams,

    I am glad to inform you that the upcoming version of RadTreeView "Prometheus" will have full client-side support. It is due in our Q3 release expected in mid December.

    Regards,
    Albert
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET > Treeview > Client-side add/move/delete node