This is a migrated thread and some comments may be shown as answers.

drag and drop between gridview and treeview

6 Answers 50 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mohamad Javad
Top achievements
Rank 1
Mohamad Javad asked on 02 Jul 2014, 08:04 AM
 hi

in ASP.NET AJAX (NOT SilverLight or ... Just For ASP.NET ajax):
How can I drag n drop multiple gridview rows to Treeview node?
How can I  drag n drop between  gridview and treeview?
Please Help me.
thanks

6 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 02 Jul 2014, 08:21 AM
Hi Mohamad Javad,

Please have a look into Multi Row Drag and Drop from RadGrid to RadTreeView  code library to achieve your scenario.

Thanks,
Shinu.
0
Mohamad Javad
Top achievements
Rank 1
answered on 02 Jul 2014, 08:41 AM
Thanks
It's look like a good sample. Thanks for that. But i need more ..
I need darg and drop (gridview to treeview)    AND   ( treeview to gridview )   TOO.
but  That Sample Not darg and drop treeview to gridview.
0
Shinu
Top achievements
Rank 1
answered on 02 Jul 2014, 08:55 AM
Hi Mohamad Javad,

Please have a look into this online demo which shows RadTreeView Drag-and-drop.

Thanks,
Shinu.
0
Mohamad Javad
Top achievements
Rank 1
answered on 03 Jul 2014, 03:32 AM
thanks very lot
0
Mohamad Javad
Top achievements
Rank 1
answered on 06 Jul 2014, 10:15 AM
hi
when i drage row from gridview and Drop to Treeview i dont know which node is click(for drop) in server side.
please help me.

the folw code to detrmin which node is dropped (in last post) not working in Page with masterPage and server side tree.
0
Shinu
Top achievements
Rank 1
answered on 22 Jul 2014, 05:28 AM
Hi Mohamad Javad,

Unfortunately I couldn't replicate the issue at my end. Please see the below code snippet to get the RadTreeView node for drop.

C#:
protected void RadGrid1_RowDrop(object sender, GridDragDropEventArgs e)
{
    if ((!String.IsNullOrEmpty(e.HtmlElement)) && (e.DraggedItems.Count > 0))
    {
        string nodeValue = nodeValueHiddenField.Value.Trim();
        Telerik.Web.UI.RadTreeNode node = RadTreeView1.FindNodeByValue(nodeValue);
        foreach (GridDataItem draggedItem in e.DraggedItems)
        {
            node.Nodes.Add(new RadTreeNode(draggedItem["Column1"].Text, draggedItem["Column2"].Text));
        }
    }
    RadTreeView1.ExpandAllNodes();
}

Please provide your code if it doesn't help.
Thanks,
Shinu.
Tags
TreeView
Asked by
Mohamad Javad
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Mohamad Javad
Top achievements
Rank 1
Share this question
or