开发者

How can i increase the default width of the advanced search form in the latest jqgrid?

in jqgrid 4.0, i am trying to see if you can change the width of the advanced search screen Right now a horizontal scroll bar comes up). Is there anyway to make the width of the form bigger as it seems to not be adjustable.

Here开发者_如何转开发 is a pic:

How can i increase the default width of the advanced search form in the latest jqgrid?


I suggest that you just increase the initial searching dialog inside of beforeShowSearch:

var grid = $("#list");
grid.jqGrid('navGrid','#pager',{add:false,edit:false,del:false},{},{},{},
                  { multipleSearch:true,
                    beforeShowSearch: function($form) {
                        $('#searchmodfbox_'+grid[0].id).width(560);
                  }
            );

see the demo.


I did it like this and it worked.

jQuery("#grid").jqGrid('navGrid','#gridPager',{add:false,edit:false,del:false,refresh: false},{},{},{},
              { 
                beforeShowSearch: function($form) {
                    $('#searchmodfbox_grid').width(760);
                    return true;
              }
              }
        );

In this search dialog's div id is { "searchmodfbox_" + yourGridId } . In my case my grid id is grid then search dialog's Id is "searchmodfbox_grid". And this is for jqgrid 4.4

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜