Does not want to resize columns in Flexigrid

≡放荡痞女 提交于 2019-12-11 03:16:49

问题


I want to disable column resizing in Flexigrid.
Is there any option like colresize:false/true ? I could not find any.


回答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.




回答2:


colResize: false property will disable the option.



来源:https://stackoverflow.com/questions/10615453/does-not-want-to-resize-columns-in-flexigrid

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!