Does Not Want To Resize Columns In Flexigrid
I want to disable column resizing in Flexigrid. Is there any option like colresize:false/true ? I could not find any.
Solution 1:
I found this:
change beginning of dragStart to:
if (dragtype=='colresize' && p.colResize == true) //column resize
{
$(g.nDiv).hide();$(g.nBtn).hide();
var n = $('div',this.cDrag).index(obj);
var ow = $('th:visible div:eq('+n+')',this.hDiv).width();
$(obj).addClass('dragging').siblings().hide();
$(obj).prev().addClass('dragging').show();
this.colresize = {startX: e.pageX, ol: parseInt(obj.style.left), ow: ow, n : n };
$('body').css('cursor','col-resize');
//cleanup
n=null;
ow=null;
}
To make it cleaner you can add a property to pass in like colResize:true, but set colResize:false as a default in flexigrid. And then check p.colResize == true to enable resizing. This way you can have it both ways when needed. Just an idea.
Post a Comment for "Does Not Want To Resize Columns In Flexigrid"