AllowRemove some and not others

3 posts, 0 answers
  1. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 09 Jun 2013 Link to this post


    I need to find a way to intercept an event, key press, or something. I need to be able delete some nodes in a RadTreeView, but not others. Some nodes are parent "static" nodes (i.e. node analogs to a List<Object>), whereas other nodes are non-static, the Object values themselves.

    I'd like to delete the non-static children, and not delete the static ones, during normal "casual" operation. That is, the user is navigating and casually pressed Delete to delete a node.

    The poor man's way of doing it will probably work: hook up some context menus, that sort of thing.

    Is there a BeforeRemove type event, or otherwise an event that allows me to check and flag a Cancel?

    Thank you...
  2. Travis
    Travis avatar
    49 posts
    Member since:
    Dec 2012

    Posted 11 Jun 2013 Link to this post

    I believe I found a suitable workaround. If we set AllowRemove = false, then handle the KeyUp (with additional SelectedNodes and/or SelectedNode) and NodeRemoved events, that will do the trick. It's a little more work but not terrible when we specialize the RadTreeView and RadTreeNodes within our application view layers.
  3. DevCraft R3 2016 release webinar banner
  4. Paul
    Paul avatar
    60 posts

    Posted 12 Jun 2013 Link to this post

    Hi Michael,

    Thank you for writing.

    I am glad to hear that you have found solution for your issue. We will introduce a new event in future release - NodeRemoving, but it has not been implemented yet. Please feel free to visit the page in our Public Issue Tracking System and add your vote:

    Please let us know if you need any further assistance.

    RadChart for WinForms is obsolete. Now what?
Back to Top