简体   繁体   中英

jQuery-bootgrid - preselect rowCount

I'm using jquery-bootgrid plugin. I'll offer the user the possibility to store some values globally, eg language etc., which then will be applied on each visit.

Bootgrid offers the ability to set some available rowCounts to be shown. I want to save this value by user. So one user can have 100, the other 25 and the other -1 (which would be "All").

However, I can't find any method or whatever to set a "pre-selected" value.

I guess something like:

var grid = $("#myGrid").bootgrid({
        columnSelection: false,
        rowCount: [10, 25, 100, -1],
        selectedRowCount: 25 // <-- this line/functionality I'm missing
    });

Any ideas for a workaround?

Not sure about what was there 4 months ago but now it is possible to use int values instead of array for "rowCount" parameter :

var grid = $("#myGrid").bootgrid({
        rowCount: 25 // exact number of rows 
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM