We just installed Winforms Q3 2009 and are noticing a problem.
We added a Treeview to a new application and ran the following two lines.
RadTreeView1.Nodes.Add("test")
RadTreeView1.Nodes.Clear()
The problem we are seeing is that after running this, the 'test' node still shows on the screen.
It seems that we are able to delete additional nodes, but that we are not able to delete the last node.
7 Answers, 1 is accepted
0
Hi Josh,
Thank you for writing. I managed to reproduce the issue. It will be fixed for the upcoming Q3 2009 service pack. Write again if you experience other issues or if you have questions regarding our controls.
Regards,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Regards,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
MP
Top achievements
Rank 1
answered on 09 Nov 2009, 05:55 PM
I have also come across a similar issue when rebinding the tree with an empty dataset. Some of the nodes are retained even though the dataset is empty.
Scenario:
Scenario:
- I bind a dataset to the treeview control and see the tree nodes (using the ParentIdMember property).
- I requery the database based on user action and get an empty dataset (0 rows) and rebind to the treeview control.
- Instead of showing an empty tree, some of the nodes are retained in the tree.
- I tried using Nodes.Clear(), setting DataSource, DataMember, DisplayMember & ParentIdMember to null but the issue still remains.
This will be a showstopper for us to upgrade to Q3-2009 release since we haven't found any workaround for this issue. Pls share if you have identified any workarounds so far.
Thanks,
MP
0
Hi MP,
Thank you for writing.
Thank you for writing.
We are aware of RadTreeView having issues with binding to empty data sources, but I am more inclined to think that this issue is related to the previous one you described. We will correct this issue in the Q3 2009 Service pack which is due in about two weeks.
Please write again if you have other issues that you need assistance with or if you have questions about our controls.
Best wishes,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Best wishes,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Joe
Top achievements
Rank 1
answered on 18 Nov 2009, 11:34 AM
This issue only seems to affect the tree when no new nodes are added after calling Nodes.Clear()
Adding a new node to the tree after clearing all nodes and setting the visibility of the new node to false seems to be a workaround for this issue.
Hope this helps, it works for me until the SP is released...
Adding a new node to the tree after clearing all nodes and setting the visibility of the new node to false seems to be a workaround for this issue.
Hope this helps, it works for me until the SP is released...
0
Hi Joe,
I confirm that the issue is now fixed and will be available in the Q3 2009 SP1 release. Write again if you need assistance with our controls.
Greetings,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I confirm that the issue is now fixed and will be available in the Q3 2009 SP1 release. Write again if you need assistance with our controls.
Greetings,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
superold
Top achievements
Rank 1
answered on 19 Nov 2009, 03:40 AM
hi.
is there a workaround? i am releasing in 4 days.
I do not bind but add on demand so to say. Remove() does not work either.
thanks
-j
0
Hi Jorge Delgado-Lopez,
Then, in all the situations in which your nodes do not get cleared, you need to invoke the method info like so:
Please note that reflection code is brittle and you need to remember to remove it when we release the service pack.
Write again if you need further assistance.
Kind regards,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
I am afraid that the only possible workaround would be to use reflection since this method is internal and cannot be accessed by subclassing RadTreeView. Here is what you need to do in order to invoke it.
In your form constructor you need to obtain a MethodInfo object like so:
MethodInfo updateUIMethod =
null
;
public
Form1()
{
InitializeComponent();
updateUIMethod =
this
.radTreeView1.GetType().GetMethod(
"UpdateUI"
, BindingFlags.Instance | BindingFlags.NonPublic);
}
Then, in all the situations in which your nodes do not get cleared, you need to invoke the method info like so:
updateUIMethod.Invoke(
this
.radTreeView1,
new
object
[] {
false
,
true
});
Please note that reflection code is brittle and you need to remember to remove it when we release the service pack.
Write again if you need further assistance.
Kind regards,
Victor
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.