Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery-bootgrid - preselect rowCount

I'm using jquery-bootgrid plugin. I'll offer the user the possibility to store some values globally, e.g. 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?

like image 790
KingKerosin Avatar asked Feb 14 '26 06:02

KingKerosin


1 Answers

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 
});
like image 191
Anonymous Avatar answered Feb 15 '26 18:02

Anonymous



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!