This is a migrated thread and some comments may be shown as answers.

RadTreeView API inconsistency?

8 Answers 82 Views
GridView
This is a migrated thread and some comments may be shown as answers.
erwin
Top achievements
Rank 1
Veteran
Iron
erwin asked on 12 May 2008, 01:58 PM
sorry, posted to wrong group -> should be in RadTreeView

Using 2008 Q1

While porting code from .net TreeView to RadTreeView, I found it inconsistent, that the .Key Property is marked deprecated, but the Nodes.Find() Method which depends on the Key is not.

Regards
Erwin

8 Answers, 1 is accepted

Sort by
0
Accepted
Jordan
Telerik team
answered on 12 May 2008, 03:51 PM
Hello erwin,

Thank you for writing.

Actually, the Find method does not depend on the Key property. It uses the value of the Name property to compare nodes. Just the parameter is named key like in the Find method of the TreeNodeCollection that is used in the Windows Forms TreeView control.

I hope this helps. If you have any additional questions, please contact me.

Regards,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mike
Top achievements
Rank 2
answered on 18 Jul 2008, 01:27 PM
Hi Guys,

Maybe I am missing something, but how do you set the name property during databind?

 tvwrItems.DataSource = objVariableGroupItemInfo;  
 tvwrItems.DisplayMember = "VarNodeText";  
 tvwrItems.ValueMember = "HierarchicalID"

I don't see a property for "NameMember".

Thanks,
~Mike.
0
Jordan
Telerik team
answered on 21 Jul 2008, 07:58 AM
Hi Mike,

Currently, RadTreeView does not use the Name property of its nodes during data binding.
We are considering extending the data binding functionality of RadTreeView, so any suggestions are welcome.
Do you need to store values other than DisplayMember and ValueMember in nodes?

Regards,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mike
Top achievements
Rank 2
answered on 21 Jul 2008, 02:05 PM
Hi Guys,

Well, as you stated in this thread...

"Actually, the Find method does not depend on the Key property. It uses the value of the Name property to compare nodes."

We are using the Find method to quickly locate nodes within our tree - I am sure this was the intended use of this method.  But we have to iterate the node collection after databind just to set the Name property so we can use the find method.

It would seem logical to allow the Name property to be part of the databind and alleviate having the developer to iterate the node collection.

Thanks,
~Mike
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 23 Jul 2008, 12:01 AM
For people new to Telerik Controls it's quite annoying when
functions that have the same name as corresponding standard windows
controls do not behave the same.

Even worse is the habit of having boolean Properties like IsVisible
where the Microsoft Standard is to leave out the Verb and just have
a Visible Property.

0
Jordan
Telerik team
answered on 23 Jul 2008, 07:02 PM
Hello Erwin,

The issue with the IsVisible property has already been addressed.
It is obsolete, and the obsolete warning suggests that the Visible property should be used instead. We will remove all of the obsolete RadTreeView and RadTreeNode members in a future release and there will be no more IsVisible property.

Regarding the searching for nodes, one could easily find nodes by anything using a simple command as described in my blog post. However, we are considering a feature of RadTreeView data binding functionality that will allow binding to fields from the data source other than these that are set as DisplayMember and ValueMember.

Best wishes,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 23 Jul 2008, 07:22 PM
Thanks for the quick response! While I was bashing Telerik for some bugs
in the WinForms RadControls, I have to say that support and answer time
are outstanding!

Are you talking about the Q2 release? Can't wait to build my test application
against the new release. I'm reluctant to port our production app
due to the many bugs and and performance problems (mainly in Docking) in Q1.

Regards
Erwin

0
Jordan
Telerik team
answered on 25 Jul 2008, 02:20 PM
Hi erwin,

Thank you for the good words. Telerik is known for its support services, and although there are still some glitches in our controls, we are doing our best to fix them. The dock gets several fixes for the Q2 release only, but more are on their way.

The Visible property and the command functionality are already available, so go ahead and review them.

Regarding the data binding functionality that I mentioned - it is not available in the Q2 2008 release of RadControls for WinForms (released yesterday). Do not hesitate to write back if you have any suggestions on how to improve it.
 
 
Regards,
Jordan
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
GridView
Asked by
erwin
Top achievements
Rank 1
Veteran
Iron
Answers by
Jordan
Telerik team
Mike
Top achievements
Rank 2
erwin
Top achievements
Rank 1
Veteran
Iron
Share this question
or