Best way to change the hierarchy structure

2 posts, 1 answers
  1. Ewgenij
    Ewgenij avatar
    11 posts
    Member since:
    Jun 2020

    Posted 03 Aug Link to this post

    I want to be able to move a node one level higher or one level lower. That works with drag and drop, but I want to achieve it programmatically. What would be the best approach then?
  2. Answer
    Svetlin
    Admin
    Svetlin avatar
    444 posts

    Posted 05 Aug Link to this post

    Hi Ewgenij,

    In order to change the hierarchy structure of the TreeView it would be required to update its data. Indeed, there isn't a built - in feature that would allow to achieve such behavior. For example, it could be done on an event such as a button click. The developer can update the data manually so that it changes its structure as required. Once the data passed to the TreeView is updated, it should be re-rendered by the framework to demonstrate its new hierarchy structure. However we don't recommend a specific scenario of how this can be achieved as it would be based on custom logic and the implementation would depend on the specific requirements of the use - case scenario.

    Regards,
    Svetlin
    Progress Telerik

Back to Top