As it appears that jqGrid is based on the jQuery dialog, is it possible to make it movable (like a dialog)? I've been able to put it inside of a dialog but it looks odd with two title bars and such. I'd "think" that the necessary class could be added to it to make it movable but I'm still fairly new at both jQuery and jqGrid.
Are you referring to the drag
property?
http://www.trirand.com/jqgridwiki/doku.php?id=wiki:form_editing
The idea to use 'gbox' div is very good. I would like only a little improve it to be able work inside of jqGrid like usual and be able to drag the grid from its header area. The code can look like
var myGridId='list';
$('#gbox_' + myGridId).draggable ({handle:"div.ui-jqgrid-titlebar"});
or like following
// get DOM element of 'gbox' div
var gboxNode = jQuery('#list')[0].parentNode.parentNode.parentNode.parentNode;
// make full jqGrid drabable
jQuery(gboxNode).draggable ({handle:"div.ui-jqgrid-titlebar"});
The structure of divs can be really good seen with firebug or developer tools of IE. I start to described it a little here http://stackoverflow.com/questions/2683108/jqgrid-footer-cells-inherits-css-from-cells-in-the-main-grid/2697747#2697747. If would be nice to add a full documentation of all jqGrid elements to the jqGrid Wiki documentation http://www.trirand.com/jqgridwiki.
I'm reposting this here (with a more generic solution) so that the code is readable. This seems to fix the resize issue I was having:
//
// Make the grid resizable.
//
$("#treegrid2").jqGrid('gridResize',{minWidth:350,minHeight:150,
stop: function (grid, ev, ui) {
$(grid.srcElement).parent ().css ("height", null);
}
});