public async Task drag(DragAndDropEventArgs args)
{
// Get the selected Node id.
var value = this.tree.SelectedNodes;
// Fetch the full node details.
var NodeDetails = await this.tree.GetTreeData(value[0]);
} |
if ( value == null)
{
var NodeDetails = await this.tree.GetTreeData(args.DraggedNodeData.Id);
}
else
{
var NodeDetails = await this.tree.GetTreeData(value);
} |
public async Task drag(DragAndDropEventArgs args)
{
var value = this.tree.SelectedNodes;
// Get the dragged node ClassList.
var dragNodeClass = await args.DraggedNode.GetClassList();
// If the classlist contain e-active class, it means the node is in selected state
foreach (string s in dragNodeClass)
{
if(s =="e-active")
{
count = 1;
}
}
// Check the dragged node is not in the selected state
if ( value == null || count == 0)
{
// Fetch the dragagedNode details.
var NodeDetails = await this.tree.GetTreeData(args.DraggedNodeData.Id);
}
else
{
var NodeDetails = await this.tree.GetTreeData(value);
count = 0;
} } |