You can drag and drop nodes from a treeview to a grid, or in fact, any element on the page. In this example, you can drop any node onto a grid and add the nodes to the grid data. You can select multiple nodes with Ctrl + Click. Please, refer to the View and Controller tabs for implementation.
@model MVCDemo.Models.OrdersJqGridModel
@using Trirand.Web.Mvc
@using MVCDemo.Models
@using System.Web.UI.WebControls

<!DOCTYPE html>
<html lang="en-us">
    <meta charset="utf-8">
    <title>jqTreeView for ASP.NET MVC - Drag And Drop to a JQGrid Instance</title>    
    <!-- jQuery runtime minified -->
    <script src="~/Scripts/jquery-3.0.0.min.js" type="text/javascript"></script>
    <!-- The jqTreeView client-side javascript -->
    <script src="~/Scripts/trirand/jquery.jqTreeView.min.js" type="text/javascript"></script>
    <!-- The jqGrid localization file we need, English in this case -->
    <script type="text/javascript" src="../../Scripts/trirand/i18n/grid.locale-en.js"></script>
    <!-- The jqGrid client-side javascript -->
    <script type="text/javascript" src="../../Scripts/trirand/jquery.jqGrid.min.js"></script>
    <!-- The jQuery UI theme that will be used by the grid. -->
    <link rel="stylesheet" type="text/css" href="" />
    <!-- The jQuery UI theme extension jqTreeView needs -->    
    <link rel="stylesheet" type="text/css" href="~/Content/themes/ui.jqtreeview.css" />
    <!-- The jQuery UI theme extension jqGrid needs -->    
    <link rel="stylesheet" type="text/css" href="~/Content/themes/ui.jqgrid.css" />
    <table width="1020">
            <td width="210" valign="top">
                        new JQTreeView
                            DataUrl = Url.Action("DragAndDropGrid_TreeView1_DataRequested"),
                            // If DragAndDropUrl is set, an controller action wil be called
                            // with event arguments tha can determine the 
                            // source and destionation nodes and treeviews
                            DragAndDropUrl = Url.Action("DragAndDropGrid_TreeView1_NodesDropped"),
                            DragAndDrop = true,
                            Height = Unit.Pixel(300),
                            Width = Unit.Pixel(200),
                            MultipleSelect = true,
                            ClientSideEvents = new TreeViewClientSideEvents
                        }, "treeview1"))           
            <td width="210" valign="top">
                @Html.Trirand().JQGrid(Model.OrdersGrid, "OrdersGrid")
    <script type="text/javascript">
    function nodesDropped(args, e) {                
        var treeView = args.sourceTreeView; // the instance to the treeview parent        
        var nodesDragged = args.draggedNodes;
        var droppedOnElement = $(;
        // check if the nodes are dropped on a grid instance
        if (droppedOnElement.parents().is(".ui-jqgrid")) {
            var listOfDraggedValues = "";
            for (var i=0; i<nodesDragged.length; i++) {
                var node = nodesDragged[i];
                var options = treeView.getNodeOptions(node);
                listOfDraggedValues += options.value + ",";
            $("#OrdersGrid").setGridParam( { postData: { draggedNodes: listOfDraggedValues } } );            
    <br />
    <br />
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Trirand.Web.Mvc;
using MVCDemo.Models;

namespace MVCDemo.Controllers.Tree
    public partial class TreeController : Controller
        public ActionResult DragAndDropGrid()
            // Get the model (setup) of the grid defined in the /Models folder.
            var gridModel = new OrdersJqGridModel();

            // Setting the DataUrl to an action (method) in the controller is required.
            // This action will return the data needed by the grid
            gridModel.OrdersGrid.DataUrl = Url.Action("DragAndDropGrid_DataRequested");

            // Pass the custmomized grid model to the View
            return View(gridModel);            

        public JsonResult DragAndDropGrid_TreeView1_DataRequested()
            var tree = new JQTreeView();            
            List<JQTreeNode> nodes = GetTreeViewNodes();            

            return tree.DataBind(nodes);

        private List<JQTreeNode> GetTreeViewNodes()
            List<JQTreeNode> nodes = new List<JQTreeNode>();

            nodes.Add(new DragLeafNode { Text = "Europe", Value = "1" });
            nodes.Add(new DragFolderNode { Text = "North America", Value = "2", Expanded = true });
            nodes.Add(new DragLeafNode { Text = "Australia", Value = "3" });

            var secondNode = nodes.Find(n => n.Text == "North America");

            secondNode.Nodes.Add(new DragLeafNode { Text = "New York", Value = "4" });
            secondNode.Nodes.Add(new DragFolderNode { Text = "California", Value = "5", Expanded = true });
            secondNode.Nodes.Add(new DragLeafNode { Text = "Texas", Value = "6" });

            var california = secondNode.Nodes.Find(n => n.Text == "California");

            california.Nodes.Add(new DragLeafNode { Text = "Los Angeles", Value = "7", Selected = true });
            california.Nodes.Add(new DragLeafNode { Text = "San Francisco", Value = "8", Selected = true });
            california.Nodes.Add(new DragLeafNode { Text = "San Diego", Value = "9", Selected = true });
            california.Nodes.Add(new DragLeafNode { Text = "Sacramento", Value = "10" });

            return nodes;

        public ActionResult DragAndDropGrid_TreeView1_NodesDropped(JQTreeNodeDropEventArgs eventArgs)
            var tree = new JQTreeView();
            JQTreeNodeDropEventArgs args = tree.GetDragDropInfo();

            // on the server side you can access the source and destionation
            // nodes and treevies and update a database, file system, etc
            List<JQTreeNode> draggedNodes = args.DraggedNodes;
            JQTreeNode destinationNode = args.DestinationNode;
            string destinationTreeViewID = args.DestinationTreeViewID;
            string sourceTreeViewID = args.SourceTreeViewID;

            // use the information and update something here

            return new EmptyResult();

        // This method is called when the grid requests data. You can choose any method to call
        // by setting the JQGrid.DataUrl property
        public JsonResult DragAndDropGrid_DataRequested(string draggedNodes)
            var tree = new JQTreeView();
            var gridModel = new OrdersJqGridModel();
            var northWindModel = new NorthwindDataContext();
            System.Data.Linq.Table<Order> orders = northWindModel.Orders;            
            List<Order> allOrders = orders.AsEnumerable<Order>().ToList<Order>();

            int orderID = 10000;
            if (!String.IsNullOrEmpty(draggedNodes))
                List<JQTreeNode> nodes = GetTreeViewNodes();
                string[] values = draggedNodes.TrimEnd(',').Split(',');
                foreach (string value in values)
                    JQTreeNode node = tree.FindNodeByValue(nodes, value);
                    Order order = new Order();
                    order.OrderID = orderID++;
                    order.CustomerID = node.Text;
                    order.ShipName = "Dragged From TreeView";
            // Get both the grid Model and the data Model
            // The data model in our case is an autogenerated linq2sql database based on Northwind.

            var iqueryable = allOrders.AsQueryable<Order>();           

            // return the result of the DataBind method, passing the datasource as a parameter
            // jqGrid for ASP.NET MVC automatically takes care of paging, sorting, filtering/searching, etc
            return gridModel.OrdersGrid.DataBind(iqueryable);
Switch theme:

Theming is based on the very popular jQuery ThemeRoller standard. This is the same theming mechanism used by jQuery UI and is now a de-facto standard for jQuery based components. The benefits of using ThemeRoller are huge. We can offer a big set of ready to use themes created by professional designers, including Windows-like themes (Redmond), Apple-like theme (Cupertino), etc. In addition to that any jQuery UI controls on the same page will pick the same theme.

Last, but not least, you can always roll your own ThemeRoller theme, using the superb Theme Editor

To use a theme, simply reference 2 Css files in your Html <head> section - the ThemeRoller theme you wish to use, and the jqGrid own ThemeRoller Css file. For example (Redmond theme):

<link rel="stylesheet" type="text/css" media="screen" href="/themes/redmond/jquery-ui-1.8.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/themes/ui.jqgrid.css" />