I am trying to make jqgrid column chooser pop-up draggable anywhere in the screen.
Hence I tried to change the jquery.jqgrid.js
as:
columnChooser: function (opts) {
var self = this;
if ($("#colchooser_" + $.jgrid.jqID(self[0].p.id)).length) { return; }
var selector = $('<div id="colchooser_' + self[0].p.id + '" style="position:relative;overflow:hidden"><div><select multiple="multiple"></select></div></div>');
var select = $('select', selector);
function insert(perm, i, v) {
if (i >= 0) {
var a = perm.slice();
var b = a.splice(i, Math.max(perm.length - i, i));
if (i > perm.length) { i = perm.length; }
a[i] = v;
return a.concat(b);
}
}
opts = $.extend({
"width": 'auto',
"height": 260,
"classname": null,
"done": function (perm) { if (perm) { self.jqGrid("remapColumns", perm, true); } },
/* msel is either the name of a ui widget class that
extends a multiselect, or a function that supports
creating a multiselect object (with no argument,
or when passed an object), and destroying it (when
passed the string "destroy"). */
"msel": "multiselect",
/* "msel_opts" : {}, */
/* dlog is either the name of a ui widget class that
behaves in a dialog-like way, or a function, that
supports creating a dialog (when passed dlog_opts)
or destroying a dialog (when passed the string
"destroy")
*/
"dlog": "dialog",
"dialog_opts": {
"minWidth": 550
},
"draggable": function (IsDraggable) {
if (IsDraggable) {
this.draggable();
}
},
....
....
....
....
....
}
My code is at the last property draggable
of the above function.
i.e. I created a draggable property which is like the below:
"draggable": function (IsDraggable) {
if (IsDraggable) {
this.draggable();
}
But my pop-up of my column chooser doesnot becomes draggable.
I am struck here.
I want to move my column chooser in jqgrid
anywhere in the screen.