How to make SfTreeView node editable

Hi. 

I have a lot of problems with TreeViewAdv, so I want to use SfTreeView instead of.

Because SfTreeView is new one, there are a few examples and articles to refer.

I want to change node's name by double-clicking or using context menu (rename) or F2 key. 

Can you make an example ? I hope the example is the modified version of SfTreeView's Drag and Drop example.




Thanks for reading.

Regards,
Sungjin

2 Replies 1 reply marked as answer

MA Mohanram Anbukkarasu Syncfusion Team August 12, 2020 12:33 PM UTC

Hi Sungjin, 

Thanks for contacting Syncfusion support.  

Currently SfTreeView doesn’t have support for editing the nodes. We have considered to provide the editing support for SfTreeView. We will implement this feature in our 2020 Volume 3 main release which is expected to be rolled out in the month of October 2020. 
 

Thank you for requesting this feature and helping us define it.  

Regards, 
Mohanram A 




FP Farjana Parveen Ayubb Syncfusion Team October 7, 2020 03:16 PM UTC

 Hi Sungjin,  
The enhancement for “Editing support in SfTreeView” completed and include in Volume 3 main release. We are glad to announce that our Essential Studio 2020 Volume 3 release v18.3.0.35 is rolled out and is available for download under the following link. 



Note: 
It is necessary to define EditTemplate/ EditTemplateSelector for bound mode, to enable editing. For UnboundMode, textbox will be loaded by default, for edit mode. 

Code snippet: 
<syncfusion:SfTreeView x:Name="treeView"  
                               ItemsSource="{Binding Folders}"     
                               ChildPropertyName="Files" 
                               AutoExpandMode="AllNodes" 
                               AllowEditing="True" 
                               > 
            <syncfusion:SfTreeView.ItemTemplate> 
                <DataTemplate> 
                    <TextBlock Text="{Binding FileName}" VerticalAlignment="Center"/> 
                </DataTemplate> 
            </syncfusion:SfTreeView.ItemTemplate> 
            <syncfusion:SfTreeView.EditTemplate> 
                <DataTemplate> 
                    <TextBox Text="{Binding FileName}" VerticalAlignment="Center"/> 
                </DataTemplate> 
            </syncfusion:SfTreeView.EditTemplate> 
        </syncfusion:SfTreeView> 
 
Sample Link: 

Regards, 
Farjana Parveen A 


Marked as answer
Loader.
Up arrow icon