Hello, i have a treeview who changes his content dynamically via the NodeFormatting event.
Is there a way to programmatically call this event so I can refresh the content without the need to hover with the mouse above it?
I've tried the Refresh() method but nothing happens.
Thanks in advance!
4 Answers, 1 is accepted
0
Hello Itai,
Thank you for writing.
In order to force the NodeFormatting event, you can call the RadTreeView.BeginUpdate and RadTreeView.EndUpdate methods. An alternative solution is to call the TreeViewElement.Update method:
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik
Thank you for writing.
In order to force the NodeFormatting event, you can call the RadTreeView.BeginUpdate and RadTreeView.EndUpdate methods. An alternative solution is to call the TreeViewElement.Update method:
this
.radTreeView1.TreeViewElement.Update(Telerik.WinControls.UI.RadTreeViewElement.UpdateActions.Reset);
I hope this information helps. Should you have further questions I would be glad to help.
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
answered on 12 Jun 2018, 01:03 PM
[quote]Dess said:Hello Itai,
Thank you for writing.
In order to force the NodeFormatting event, you can call the RadTreeView.BeginUpdate and RadTreeView.EndUpdate methods. An alternative solution is to call the TreeViewElement.Update method:
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik
Thank you for writing.
In order to force the NodeFormatting event, you can call the RadTreeView.BeginUpdate and RadTreeView.EndUpdate methods. An alternative solution is to call the TreeViewElement.Update method:
this
.radTreeView1.TreeViewElement.Update(Telerik.WinControls.UI.RadTreeViewElement.UpdateActions.Reset);
I hope this information helps. Should you have further questions I would be glad to help.
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
[/quote]
This works, but what I don't like, is that the tree view flashes. Is there a way to prevent that?
Thanks
0
Mark
Top achievements
Rank 2
Bronze
Iron
Veteran
answered on 12 Jun 2018, 01:43 PM
[quote]Mark said:[quote]Dess said:Hello Itai,
Thank you for writing.
In order to force the NodeFormatting event, you can call the RadTreeView.BeginUpdate and RadTreeView.EndUpdate methods. An alternative solution is to call the TreeViewElement.Update method:
I hope this information helps. Should you have further questions I would be glad to help.
Regards,
Dess
Telerik
Thank you for writing.
In order to force the NodeFormatting event, you can call the RadTreeView.BeginUpdate and RadTreeView.EndUpdate methods. An alternative solution is to call the TreeViewElement.Update method:
this
.radTreeView1.TreeViewElement.Update(Telerik.WinControls.UI.RadTreeViewElement.UpdateActions.Reset);
I hope this information helps. Should you have further questions I would be glad to help.
Dess
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
[/quote]
This works, but what I don't like, is that the tree view flashes. Is there a way to prevent that?
Thanks
[/quote]
Ok, so, after some playing around, if you just call
<p></p><p>radTreeView1.Nodes.Refresh()</p>
This does the same thing, which out causing the tree view to blink.
0
Hello, Mark,
I am glad that you have found a suitable solution for your case. However, note that it is normal that the RadTreeView may flash when you reset it completely. Refreshing only the nodes causes a lighter visual update. Feel free to use it for your scenario.
If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
I am glad that you have found a suitable solution for your case. However, note that it is normal that the RadTreeView may flash when you reset it completely. Refreshing only the nodes causes a lighter visual update. Feel free to use it for your scenario.
If you have any additional questions, please let me know.
Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which
deliver the business app essential building blocks - a grid component,
data visualization (charts) and form elements.