BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
<div id="Grid" style="float:left;width:49%"></div> <div id="DestGrid" style="float:right;width:49%"></div> |
$("#Grid").ejGrid({ dataSource: window.gridData, editSettings: { allowAdding: true, allowDeleting: true }, allowPaging: true, allowRowDragAndDrop: true, rowDrop: function (args) { var trobj = $("#DestGrid").ejTreeGrid("instance"); trobj.addRow(this.getSelectedRecords()[0], ej.TreeGrid.RowPosition.Top); this.deleteRow() }, rowDropSettings: { dropTargetID: "#DestGrid" }, columns: [ { field: "OrderID", headerText: "Order ID", isPrimaryKey: true, textAlign: ej.TextAlign.Right, width: 80 }, { field: "CustomerID", headerText: "Customer ID", width: 90 }, { field: "Freight", headerText: "Freight", textAlign: ej.TextAlign.Right, width: 75, format: "{0:C}" }, { field: "ShipCountry", headerText: "Ship Country", width: 110 } ], }); |
<script type="text/javascript"> var cloneData = []; $(function () { $("#DestGrid").ejDraggable({ clone: true, helper: function () { return $(".e-rowcell.e-selectionbackground").parent(); }, dragStop: function (args) { var obj = $("#Grid").ejGrid("instance"); var trobj = $("#DestGrid").ejTreeGrid("instance"); cloneData = trobj.getSelectedRecords(); if (cloneData.length > 0) obj.addRecord(cloneData); else args.cancel = true; cloneData = []; trobj.deleteRow(); }, } ); $("#DestGrid").ejTreeGrid({ dataSource: [], editSettings: { allowAdding: true, allowDeleting: true }, columns: [ { field: "OrderID", headerText: "Order ID", isPrimaryKey: true }, { field: "CustomerID", headerText: "Customer ID" }, { field: "Freight", headerText: "Freight" }, { field: "ShipCountry", headerText: "Ship Country" } ], }); }); |