Determine if Node is Expanding or Contracting in NodeExpandedChanging Event

3 posts, 1 answers
  1. Paul
    Paul avatar
    23 posts
    Member since:
    Feb 2013

    Posted 20 Feb 2014 Link to this post

    Is there a way to determine whether a node is expanding or collapsing when handling the NodeExpandedChanging event?
  2. Answer
    Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 24 Feb 2014 Link to this post

    Hello Paul,

    Thank you for writing. 

    The NodeExpandedChanged event gets triggered when the expanded state of a node is changed, so you can check the e.Node.Expanded state and if it is true, this means that the node was not expanded and it now is. On the contrary, if is it false, this means that the node was expanded and not is it not.

    I hope this helps. 

    Regards,
    Stefan
    Telerik
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Paul
    Paul avatar
    23 posts
    Member since:
    Feb 2013

    Posted 24 Feb 2014 in reply to Stefan Link to this post

    Thanks. Not sure how I missed the Expanded property. Since I'm using the NodeExpandedChanging event, I just make sure Expanded is false to verity that the node is currently expanding.
Back to Top