Edit TreeView Node

6 posts, 0 answers
  1. Anthony
    Anthony avatar
    1 posts
    Member since:
    Oct 2012

    Posted 02 Sep 2008 Link to this post

    I am able to set the TreeView to editable, IsEditable = true, but I cannot find a way to create a custom edit template.  How can I specify a specific template for editing?

    Thanks!
  2. Hristo
    Admin
    Hristo avatar
    832 posts

    Posted 03 Sep 2008 Link to this post

    Hello Anthony,

    At the moment, RadTreeView does not support custom templates for editing mode. You can, however, change it if you change the whole RadTreeViewItem control template. There is a commented line that shows which is the element that shows whether treeview is in edit mode.

    //RadTreeViewItem template.
    <!-- Edit element --> 
    <Border Visibility="Collapsed" Grid.Column="4" HorizontalAlignment="Left" VerticalAlignment="Center" Background="#0C000000" CornerRadius="3,3,3,3" Width="Auto" BorderThickness="1" x:Name="EditElementContainer" BorderBrush="#7FFFFFFF">  
       <Border Height="Auto" CornerRadius="2,2,2,2" Width="Auto" BorderThickness="1" BorderBrush="#3E000000">  
          <TextBox x:Name="EditElement" BorderThickness="0"/>  
       </Border> 
    </Border> 

    Please, keep in mind that the name of the elements (x:Name="...") should be the same and the element with x:Name="EditElement " should be TextBox.

    This is definitely something that we should improve in the next versions.

    Thanks for your feedback. We updated your points as per our EAP Program.

    Best wishes,
    Hristo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Tim
    Tim  avatar
    4 posts
    Member since:
    Oct 2008

    Posted 02 Oct 2008 Link to this post

    Hi,

    I tried to change the treeviewitem template using the code from the examples, specifically the CustomLayout.xaml example. However, I'm not able to put the edit-itemplate the way I want to.
    And when I try to edit the template for a treeviewitem in Expression Blend, I just get an empty ControlTemplate.
    Is it possible to retrieve the entire default control template for the treeview items? (Like on MSDN, you'll find a default control template for e.g. a listboxitem.)
    So I can start editing the specific items in that template.

    Regards,

    Tim
  4. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 03 Oct 2008 Link to this post

    Hello Tim ,

    I'm attaching the latest treeview and treeviewitem  templates so you can edit tjhem in blend.

    Let us know if you need more help.

    Sincerely yours,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Tim
    Tim  avatar
    4 posts
    Member since:
    Oct 2008

    Posted 03 Oct 2008 Link to this post

    Hi Valentin,

    Thank you very much for the quick response.
    Those templates will be very helpfull.

    It might be usefull to integrate the default templates for all controls in the helpfiles.
    Just an idea... :)

    Kind Regards,

    Tim
  6. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 06 Oct 2008 Link to this post

    Hello Tim ,

    Yes - we have a separate project with all default themes listed there. We will make it available with the official release.

    Thanks for the feedback!

    Kind regards,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top