Drag jqgrid one column value to another, as in excel

How to drag jqgrid column value to another, like drag and drop in excel? Can this be solved? Below is the jgrid code:

$(document).ready(function () { $('#form_table').jqGrid('setCell', 2, 'column Name', '', {color: 'red'}); jQuery("#form_table").jqGrid({ datatype: "local", mtype: "POST", url: '', colNames: ['Id', 'तालीममा सहभागीको नाम थर', 'जिल्ला', 'गा.वि.स', 'वडा नं', 'जातजाती', 'लिङ्ग', 'उमेर'], colModel: [ {name: 'id', index: 'id', jsonmap: "id", hidden: true, }, {name: 'name', index: 'name', jsonmap: "name", width: 250, editable: true}, {name: 'district', index: 'district', jsonmap: "district", width: 100, editable: true, align: 'center', edittype: 'select', editoptions: { value: {"":"",<?php foreach ($districts as $district) { echo "'" . $district->dis_nepali . "': '" . $district->dis_nepali . "', "; } ?> }, defaultValue: ''}, formatter: 'select'}, {name: 'vdc', index: 'vdc', jsonmap: "vdc", width: 100, editable: true}, {name: 'ward_no', index: 'ward_no', jsonmap: "ward_no", width: 80, editable: true}, {name: 'caste', index: 'caste', jsonmap: "caste", width: 100, editable: true, align: "center", edittype: 'select', editoptions: {value: {"दलीत": "दलीत","आ/जनजाती": "आ/जनजाती", "बा छ्य": "बा छ्य", "मधेसी": "मधेसी", "अन्य": "अन्य","":""}, defaultValue: ''}, formatter: "select"}, {name: 'gender', index: 'gender', jsonmap: "gender", width: 100, editable: true, align: "center", edittype: 'select', editoptions: {value: {"महिला": "महिला", "पूरूष": "पूरूष","":""}}, formatter: "select"}, {name: 'age_group', index: 'age_group', jsonmap: "age_group", width: 100, editable: true,} ], loadComplete: function (data) { var grid = jQuery("#form_table"), pageSize = parseInt(grid.jqGrid("getGridParam", "rowNum")), emptyRows = pageSize - data.rows.length; if (data.rows.length == 0) { for (var j = 1; j <= emptyRows; j++) // Send rowId as undefined to force jqGrid to generate random rowId grid.jqGrid('addRowData', undefined, {}); } if (emptyRows > 0) { for (var i = 1; i <= emptyRows; i++) // Send rowId as undefined to force jqGrid to generate random rowId grid.jqGrid('addRowData', undefined, {}); } }, jsonreader: {repeatitems: false, id: 'id', root: 'root'}, pager: '#form_pager', rowNum: 10, toppager: true, //for pager on top height: "auto", rowList: [10, 20, 50, 100], // sortname: 'id', viewrecords: true, gridview: true, resizable: true, rownumbers: true, loadonce: true, //shrinkToFit:false, loadtext: 'Loading...', cellEdit: true, contentType: "application/json", cellsubmit: 'clientArray', cellurl: "" }); jQuery("#form_table").jqGrid('navGrid', '#form_pager', { cloneToTop: true, edit: false, add: false, del: false }); jQuery("#form_table").jqGrid('setGroupHeaders', { useColSpanStyle: true, groupHeaders: [ {startColumnName: 'district', numberOfColumns: 3, titleText: 'ठेगाना'} ] }); }): 

Now I want the column name 2 of row 1 to be dragged into the name of column 2 to row 15, is there any solution? Any help would be greatly appreciated. Thank you.

+1
javascript jquery php excel jqgrid
Jun 10 '16 at 17:35
source share

No one has answered this question yet.

See similar questions:

3
JQGrid drag check

or similar:

10
How to add checkbox to jQgrid header
6
JQgrid checkbox in onclick update database
3
Jqgrid error in frozen columns
2
JqGrid selection box in cell
2
Reading editable input values ​​in jqgrid
one
JQgrids refers to another view
0
Cannot display more than 8 rows while editing a row in jqgrid in edit form
0
select in jqgrid disappeared when i click the next page
0
How to get the value of a specific cell in JQgrid
0
JqGrid add new version of form



All Articles