Last post Aug 23, 2015 09:54 PM by Li Wang
Member
13 Points
111 Posts
Aug 21, 2015 12:51 PM|ajmaly|LINK
Hello All,
I have a jqgrid where,
Question : Everything's works perfect, but when I try to drop row between "test4" & "test5" row, I m not able to do that?
Looks like, when there is 2 not draggable rows, we can't put a row in between?
Is there any way, we can drop??? Thanks
Here is code,
<html> <head> <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/themes/redmond/jquery-ui.css" /> <link rel="stylesheet" type="text/css" href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.4.1/css/ui.jqgrid.css" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script> <script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.4.1/js/i18n/grid.locale-en.js"></script> <script type="text/javascript" src="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.4.1/js/jquery.jqGrid.src.js"></script> <style type="text/css"> .unsortable {} </style> <script type="text/javascript"> $(document).ready(function () { 'use strict'; var mydata = [ {id: "1", name: "test1"}, {id: "2", name: "test2"}, {id: "3", name: "test3"}, {id: "4", name: "test4"}, {id: "5", name: "test5"}, {id: "6", name: "test6"}, {id: "7", name: "test7"} ]; $("#list").jqGrid({ datatype: 'local', data: mydata, colNames: [/*'Id', */'Client'], colModel: [ {name: 'name', index: 'name', width: 200} ], loadComplete: function (data) { jQuery("#4",jQuery("#list")[0]).addClass('unsortable'); jQuery("#5",jQuery("#list")[0]).addClass('unsortable'); } }).jqGrid('sortableRows', { items: '.jqgrow:not(.unsortable)'}); }); </script> </head> <body> <table id="list"><tr><td></td></tr></table> </body> </html>
JQuery grid
Star
9859 Points
974 Posts
Aug 23, 2015 09:54 PM|Li Wang|LINK
Hi ajmaly,
Thank you for your post.
ajmaly Is there any way, we can drop???
It is the default behavior of jqGrid. We can't do that.
Best Regards, Wang Li
Member
13 Points
111 Posts
how to drop jqgrid row between not draggable rows
Aug 21, 2015 12:51 PM|ajmaly|LINK
Hello All,
I have a jqgrid where,
Question : Everything's works perfect, but when I try to drop row between "test4" & "test5" row, I m not able to do that?
Looks like, when there is 2 not draggable rows, we can't put a row in between?
Is there any way, we can drop??? Thanks
Here is code,
JQuery grid
Star
9859 Points
974 Posts
Re: how to drop jqgrid row between not draggable rows
Aug 23, 2015 09:54 PM|Li Wang|LINK
Hi ajmaly,
Thank you for your post.
It is the default behavior of jqGrid. We can't do that.
Best Regards,
Wang Li
JQuery grid