
Fredrick Smith
Top achievements
Rank 1
Fredrick Smith
asked on 27 Jun 2007, 08:34 PM
Ok,
I'm having a problem that is driving me crazy.
I have a RadTreeView that is updated each time someone changes rows in a DataGridView that is besides the RadTreeView. Now the thing is that on some ocations, there are no entries to be displayed on the RadTreeView. I use clear each time a row change occurs, but the RadTreeView still keeps the values of the old entries, even after calling the RadTreeView.Clear() function and then RadTreeView.Refres().
Now, shouldn't this clear the RadTreeView and leave it with NO nodes?
Thanks,
Ricardo
I'm having a problem that is driving me crazy.
I have a RadTreeView that is updated each time someone changes rows in a DataGridView that is besides the RadTreeView. Now the thing is that on some ocations, there are no entries to be displayed on the RadTreeView. I use clear each time a row change occurs, but the RadTreeView still keeps the values of the old entries, even after calling the RadTreeView.Clear() function and then RadTreeView.Refres().
Now, shouldn't this clear the RadTreeView and leave it with NO nodes?
Thanks,
Ricardo
5 Answers, 1 is accepted
0

Todd Anglin
Top achievements
Rank 2
answered on 27 Jun 2007, 11:07 PM
Ricardo,
Sorry to hear you're having trouble. I agree that this process is a little confusing and it should probably be improved in the next release of the control.
Basically, it appears that calling radTreeView1.Nodes.Clear() only removes the expand/collapse nodes and not the full text of the node, too. To remove all of the nodes for now, try doing this instead:
this.radTreeView1.Nodes.Clear();
this.radTreeView1.Controls.Clear();
That should get rid of all nodes in the TreeView. Let me know if that helps.
Thanks~
Todd
Sorry to hear you're having trouble. I agree that this process is a little confusing and it should probably be improved in the next release of the control.
Basically, it appears that calling radTreeView1.Nodes.Clear() only removes the expand/collapse nodes and not the full text of the node, too. To remove all of the nodes for now, try doing this instead:
this.radTreeView1.Nodes.Clear();
this.radTreeView1.Controls.Clear();
That should get rid of all nodes in the TreeView. Let me know if that helps.
Thanks~
Todd
0

Fredrick Smith
Top achievements
Rank 1
answered on 28 Jun 2007, 12:42 PM
Todd, thanks for your help.
Unfortunately it doesn't work. I used the two commands and I still get left overs from on the RadTreeView.
Any other ideas?
Ricardo
Unfortunately it doesn't work. I used the two commands and I still get left overs from on the RadTreeView.
Any other ideas?
Ricardo
0
Hi Fredrick,
You could try invalidating the treeview as follows:
Kind regards,
Jordan
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
You could try invalidating the treeview as follows:
this.radTreeView1.Nodes.Clear(); |
this.radTreeView1.InvalidateLayout(); |
Kind regards,
Jordan
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
0

Fredrick Smith
Top achievements
Rank 1
answered on 29 Jun 2007, 12:37 PM
Yess, finally it worked.
Now my question is, why do I need to do this? Shouldn't the Clear() function already do this automatically?
Thanks you all for your help!
Ricardo
Now my question is, why do I need to do this? Shouldn't the Clear() function already do this automatically?
Thanks you all for your help!
Ricardo
0
We are happy to hear that we were able to help, Fredrick.
Very good question, indeed. This little glitch is already fixed and will appear in SP2 due next week.
Best wishes,
Jordan
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center
Very good question, indeed. This little glitch is already fixed and will appear in SP2 due next week.
Best wishes,
Jordan
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center