How to force a refresh/update?

3 posts, 0 answers
  1. Kristoffer
    Kristoffer avatar
    158 posts
    Member since:
    Dec 2012

    Posted 13 Feb 2013 Link to this post

    When a property is changed through my property grid, I want to make sure the tree is up to date.

    private void radPropertyGridNode_PropertyValueChanged(object sender, PropertyGridItemValueChangedEventArgs e)
    {
         radTreeView.Refresh();
    }

    Refresh() does not work.
    Invalidate() does not work.
    Update() does not work.

    Hovering the control using the mouse does work.

    How can I programmatically update the tree so that it fires the NodeFormatting event (where my nodes are updated)?
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 Feb 2013 Link to this post

    Hi Kristoffer,

    You can use the
    Update method of the TreeViewElement to update the current view of the control:
    treeView.TreeViewElement.Update(RadTreeViewElement.UpdateActions.Resume);
    or
    treeView.TreeViewElement.Update(RadTreeViewElement.UpdateActions.Reset);

    I hope this helps.

    Regards,
    Julian Benkov
    the Telerik team
    Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Kristoffer
    Kristoffer avatar
    158 posts
    Member since:
    Dec 2012

    Posted 18 Feb 2013 Link to this post

    Thanks. That did the trick!
Back to Top