Drag and drop rows in a jqgrid -
i new jqgrid. trying drag & drop option rows in jqgrid. have tried fiddle http://jsfiddle.net/qezhr/298/
lot valuable suggestions. have tried jquery("#mytable").griddnd(); , with
jquery("#mytable").jqgrid('griddnd');
i having same problem looked example.
made few changes , seems work.
include: jquery ui.js base jquery drag , drop code is. include: jquery.tablednd.js
move dnd call , sortable rows calls after create grid.
working fiddle: http://jsfiddle.net/netroworx/6wmm7/
$(document).ready(function() { jquery("#mytable").jqgrid({ datatype:"clientside", data:[ {"number": 1, "segment":"first", "name": "chap0"}, {"number": 2, "segment":"second", "name": "chap1"}, {"number": 3, "segment":"third", "name": "chap2"}, ], colnames:['chapter name', 'chapter number', 'document segment'], colmodel:[ {name:'name'}, {name:'number', sorttype:'number'}, {name:'segment'}, ], autowidth:true, height:'200', sortname: 'number', viewrecords: true, caption: 'my first grid', altrows:true }); jquery("#mytable").sortablerows(); jquery("#mytable").jqgrid('griddnd'); });
Comments
Post a Comment