开发者

Initialize jqgrid in a minimized state and only load data when maximized

开发者 https://www.devze.com 2023-02-17 06:38 出处:网络
For jqgrid, you can supply a caption.If you do so, it creates a header with a button to minimize/expand the grid.

For jqgrid, you can supply a caption. If you do so, it creates a header with a button to minimize/expand the grid.

I have a page with several jqgrids. I'd like them all to start in the minimized state. They should wait to load the data until a user clicks the maximi开发者_开发知识库ze button.

Is this possible?


You should just use the parameter hiddengrid:true of the jqGrid. Be careful it works not with all datatypes (not for tree grids for example).

If you set the hiddengrid:true with

$.extend($.jgrid.defaults, {hiddengrid:true});

the setting will be default and will be used by all grids on the page which has no hiddengrid defined.


Use jqgrid option scroll: true for infinite scroll pages.

.jqGrid({
            datatype : "local",
            data : JSONData,
            height : ($(window).height() - 250),
            width : ($(window).width() - 32),
            scroll : true, 
            rowNum:20, // the number of row's to be displayed the first time
...
..
});

check http://www.trirand.com/jqgridwiki/doku.php?id=wiki:options look scroll -- option.

0

精彩评论

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