RadTreeView API inconsistency?

9 posts, 1 answers
  1. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 12 May 2008 Link to this post

    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
  2. Answer
    Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 12 May 2008 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 18 Jul 2008 Link to this post

    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.
  5. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 21 Jul 2008 Link to this post

    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
  6. Mike
    Mike avatar
    76 posts
    Member since:
    Nov 2004

    Posted 21 Jul 2008 Link to this post

    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
  7. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 22 Jul 2008 Link to this post

    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.

  8. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 23 Jul 2008 Link to this post

    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
  9. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 23 Jul 2008 Link to this post

    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

  10. Jordan
    Admin
    Jordan avatar
    547 posts

    Posted 25 Jul 2008 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready