Thank you for your solution; Thread ID:155455
Drag and drop between two trees for v18.3.0.51 can be work.
My requirement is to Drag and drop between two
trees with SplitterPanes and then add the SfContextMenu to the TreeView node .
But if I put reference to Thread ID:158575 for ContextMenu component) sample code and add code SelectedNodes="@selectedNodes.ToArray()" to execute together, it will show error as below :
however, if execute Thread ID:158575 sample code independently will be work.
please advise if there is any restriction for SelectedNodes="@selectedNodes.ToArray()" of TreeView ?
Best regards,
Jacky
|
<SfTreeView TValue="EmployeeData" @ref="tree" AllowDragAndDrop="true" @bind-SelectedNodes="@selectedNodes">
<TreeViewFieldsSettings Id="Id" ParentID="Pid" DataSource="@ListData" Text="Name" HasChildren="HasChild"></TreeViewFieldsSettings>
<TreeViewEvents TValue="EmployeeData" NodeSelected="OnSelect" NodeClicked="nodeClicked"></TreeViewEvents>
<SfContextMenu TValue="MenuItem" @ref="menu" Target="#treeview" Items="@MenuItems">
<MenuEvents TValue="MenuItem" ItemSelected="MenuSelect"></MenuEvents>
</SfContextMenu>
</SfTreeView>
public string[] selectedNodes { get; set; }
// Triggers when TreeView node is clicked
public void nodeClicked(NodeClickEventArgs args)
{
selectedId = args.NodeData.Id;
selectedNodes = new string[] { selectedId };
} |
Hi Sowamiya,
I upgrade to the sample project as attach file to .net 5 && Syncfusion.Blazor 19.4.0.53, the SfContextMenu seems not work.
please advise if is there any restriction for this?
Best regards,
Jacky
Hi Gayathri ,
Thank for your reply , waiting for patch release .
Regards!
Jacky
Hi Gayathri ,
After upgrade the Syncfusion packages, it's works , thank again.
Best Regards!
Jacky