Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TreeView > Rad Tree view ItemTemplate

Not answered Rad Tree view ItemTemplate

Feed from this thread
  • Ahmad avatar

    Posted on Jan 8, 2012 (permalink)

    i had an wpf application contains radtreeview ,i add HierarchicalDataTemplate inside RadTreeview Item Template which contains:

    1- RadComboBox 
    2- grid contains three textboxs and radcombobox.

    when radcomobox selectionchanged the grid bind data into textboxes  according to the selected value in the combobox.

    how i can return the current row when RadComboBox is changed, and how i get the contorls inside the row as well.

    Regards 


    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Jan 11, 2012 (permalink)

    Hi Ahmad,

     In a good MVVM design, you will be able to detect the current RadTreeViewItem (the selected one), current Row in a GridView, current item that is in edit Mode and etc. So I suggest you work with ViewModels only - bind the controls in the Template to a properties in your ViewModels and change only the ViewModels.
    However, if you need to access a control down or up in the Visual tree you can use the Telerik's extension methods ParentOfType<>, or ChildrenOfType<>. Two things are important here- Popups( the DropDownContent of a DropDownButton is usually a Popup) are in a different Visual Trees than the other controls so ParentOfType often cannot be used with them. On the other hand, these two methods are potentially slow - so you better avoid them.

    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WPF > TreeView > Rad Tree view ItemTemplate
Related resources for "Rad Tree view ItemTemplate"

WPF TreeView Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]