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

Edit TreeView Node

5 Answers 201 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Anthony
Top achievements
Rank 1
Anthony asked on 02 Sep 2008, 08:05 PM
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!

5 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 03 Sep 2008, 01:36 PM
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.
0
Tim
Top achievements
Rank 1
answered on 02 Oct 2008, 04:58 PM
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
0
Valentin.Stoychev
Telerik team
answered on 03 Oct 2008, 08:34 AM
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.
0
Tim
Top achievements
Rank 1
answered on 03 Oct 2008, 12:46 PM
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
0
Valentin.Stoychev
Telerik team
answered on 06 Oct 2008, 11:53 AM
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.
Tags
TreeView
Asked by
Anthony
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Tim
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Share this question
or