"Process the tree node operations using context menu in Blazor TreeView component" from your documentation not working after volume 3 update

Hi,
I had made a system for editing the treeview based on your documentation from the following link.
https://blazor.syncfusion.com/documentation/treeview/how-to/process-the-tree-node-operations-using-context-menu/#process-the-tree-node-operations-using-context-menu

However since the 18.3 update it has stopped working. When you run the example from the link above there are multiple errors.
Including ContextMenuEvents has changed to MenuEvents. 
And it also mentions in your documentation that BeginEdit is now deprecated.

So i cannot not edit nodes or add nodes based on that example with the new update. Is there a new way to do this?

Thanks

6 Replies 1 reply marked as answer

SP Sowmiya Padmanaban Syncfusion Team October 30, 2020 11:18 AM UTC

Hi Fergus,  
 
Greetings from Syncfusion support. 
 
Query 1- Documentation sample. 
 
We have made some breaking changes in our component from last Volume release version(18.3.35). Please refer to the below link for the release notes. 
 
 
We will resolve the sample level issues and update with the changes in documentation site, soon. We suggest you to update the (Syncfusion.Blazor) package to the latest version (18.3.44) .  
 
For your reference, we have prepared your mentioned documentation sample using latest version. 
 
 
Query 2- Begin edit method. 
 
We have not deprecated the beginEdit method in TreeView component. And also, you can add/ remove the TreeView nodes by updating the data source of TreeView directly. Now, TreeView will detect the changes in datasource and it will re-render with update changes in data source. 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P 


Marked as answer

FE Fergus November 3, 2020 02:59 PM UTC

Hi,
I have tried out the sample project you sent me. It works fine out of the box.
But if i use a NodeTemplate it then does not work anymore. This used to work before.

So if i add...
<TreeViewTemplates TValue="EmployeeData">
            <NodeTemplate>
                @{
                    EmployeeData treeitem = context as EmployeeData;


                    <span>@treeitem.Name - @treeitem.Id</span>
                }
                </NodeTemplate>
            </TreeViewTemplates>

into the treeview then it stops editing and adding.

Thanks


SP Sowmiya Padmanaban Syncfusion Team November 4, 2020 01:06 PM UTC

Hi Fergus 
 
We have checked your reported problem with TreeView  component.  
 
Case 1: Adding the nodes in TreeView component. 
 
TreeView nodes are added properly in TreeView component. Refer the below video footage. 
 
 
Case 2: Editing the node in TreeView component. 
 
We can replicate your reported issue, when using the template property of TreeView component . We have consider this issue as a bug. Fix for this issue will be included in our Volume 4 release which is expected to be rolled out by the end of December 2020. 
 
Please, track the following feedback link to know the status of this issue fix. 
 
 
We appreciate your patience. 
 
Regards,  
Sowmiya.P 



FE Fergus November 5, 2020 03:31 PM UTC

Hi,
Thanks for the info. I will use a workaround until the December release.

Another issue with drag and drop with a node template is args.DropIndicator is always null now since the update to 18.3.
So i cannot determine if a node is dropped on another node or in between them. i.e  if (args.DropIndicator == "e-no-drop") return; It always returns null.




SP Sowmiya Padmanaban Syncfusion Team November 6, 2020 12:19 PM UTC

Hi Fergus,  
 
We have checked your reported problem with TreeView component using our latest version(18.3.47). But we were unable to replicate your reported problem. DropIndicator value is available properly in the OnNodeDragStop event. 
 
Refer the below code snippet. 
 
@using Syncfusion.Blazor.Navigations 
<SfTreeView TValue="MailItem" AllowDragAndDrop="true"> 
    <TreeViewEvents TValue="MailItem"  OnNodeDragStop="nodeDragstop"></TreeViewEvents> 
    <TreeViewFieldsSettings TValue="MailItem" Id="Id" DataSource="@MyFolder" Text="FolderName" ParentID="ParentId" HasChildren="HasSubFolders" Expanded="Expanded"></TreeViewFieldsSettings> 
    <TreeViewTemplates TValue="MailItem" > 
        <NodeTemplate> 
            @{ 
                var employee = ((context as MailItem)); 
                <div class="ejob">@((@context as MailItem).FolderName)</div> 
            } 
        </NodeTemplate> 
    </TreeViewTemplates> 
</SfTreeView> 
public void nodeDragstop(Syncfusion.Blazor.Navigations.DragAndDropEventArgs args) 
    { 
        var dropindicator = args.DropIndicator; 
    } 
 
 
Refer the below screenshot. 
 
 
 
 
 
Refer the sample link below. 
 
 
If the issue still persist, could you please share the below details. 
 
1.     In which TreeView event, you are expecting to get the dropIndicator in your application? 
 
2.     If possible, replicate the issue in attached sample. 
 
3.     Share the issue replicating video footage. 
 
Please let us know, if you need any further assistance. 
 
Regards,  
Sowmiya.P


KR Keerthana Rajendran Syncfusion Team December 18, 2020 06:16 AM UTC

Hi Fergus, 
 
We are glad to announce that our Essential Studio 2020 Volume 4 release v18.4.0.30  is rolled out and is available for download under the following link. 
 
 
The reported issue “Node editing is not working properly when using template property” has been fixed and included with this release. Please upgrade your package to the latest version (18.4.0.30) to resolve the issue. 
 
 
 
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 
 
Regards,            
Keerthana. 


Loader.
Up arrow icon