Hello, I've attached the code I'm working on.
Basically I'm trying to recreate the same as the example that I posted here: https://www.syncfusion.com/forums/171329/sftreegrid-exception-on-selection-in-edit-mode BUT USING TREEVIEW control.
As you can see running the project the parent node not show.
As the prevoius example I would group the employes by ReportsTo property, and then drag and drop theme between the 2 viewmodels(like I done with treegridview in the example).
I don't understande where is my mistake.
Any advice?
I've ported thi example:https://github.com/SyncfusionExamples/How-to-customize-tree-nodes-using-data-template-selector-in-wpf-treeview to VB.NET (.NET CORE 3.1) using Stylet MVVM Framework (https://github.com/canton7/Stylet ). Then I tryed to enable editmode adding:
x:Name="sfTreeView"
ItemsSource="{Binding Items}"
ChildPropertyName="Files"
AutoExpandMode="RootNodes"
AllowEditing="True"
>
Text="{Binding Name}" VerticalAlignment="Center"/>
Text="{Binding Name}"
VerticalContentAlignment="Center"
Margin="-4,0,-4,0"
Height="{Binding ItemHeight,ElementName=sfTreeView}" />
as showed here: https://help.syncfusion.com/wpf/treeview/editing I can edit but when I press enter I lose the change. what am I missing?
Is it possible also to have multicolumn to show properties of the objects?
|
Queries |
Solutions | |
|
I can edit but when I press enter I lose the change. what am I missing?
|
We suspect that in your application does not implement with the EditTemplateSelector in SfTreeView. So, You can resolve the reported problem by using EditTemplateSelector in SfTreeView. Please refer the below code snippet, XAML Code Snippet:
| |
|
Is it possible also to have multicolumn to show properties of the objects? |
No. SfTreeView does not contains support to show multicolumn. However, Your requirement can be achieved by using TreeViewADV control. For more information related to MultiColumnTreeView, please refer the below user guide documentation link, |
Thanks. I'm thinking that maybe I selected the wrong control.
My scenario is that: I have a collection/list of object with some properties.
I need to display some of this properties in the treegrid as multicolumn.
Need also drag and drop feature between 2 treegrid to move one object from one collection to another
Need to add "parent" node to "group" the item into user created "folders", and display different icon based on one specific property of the objects.
Need also to edit/delete add items at runtime by user interaction.
Should I use treeviewAdv?
|
Queries |
Solutions | |
|
I have a collection/list of object with some properties.
|
TreeViewAdv supports object binding. For more information related to Populating with Data, please refer the below user guide documentation link, | |
|
I need to display some of this properties in the treegrid as multicolumn. |
TreeView control can be created with multiple columns by setting the MultiColumnEnable property to true. For more information related to MultiColumnTreeView, please refer the below user guide documentation link, | |
|
Need also drag and drop feature between 2 treegrid to move one object from one collection to another
|
TreeViewAdv control enables to drag TreeView items from one location to another. This is done by enabling the AllowDragDrop property. For more information related to Dragging TreeView, please refer the below user guide documentation link,
| |
|
Need to add "parent" node to "group" the item into user created "folders", and display different icon based on one specific property of the objects.
|
TreeViewAdv control support to add images to the left and right corner. For more information related to Images, please refer the below user guide documentation link,
| |
|
Need also to edit items at runtime by user interaction.
|
TreeViewAdv allow user to edit/non-edit the tree node items at runtime, by enable/disable IsEditable property. For more information related to Images, please refer the below user guide documentation link, UG Link: https://help.syncfusion.com/wpf/classic/treeview/node-editing | |
|
Need also to delete add items at runtime by user interaction.
|
Item can be removed by directly in underlying collection also using Remove () or RemoveAt (int index). The remove method can be used like below.
|