rstaib / jquery-bootgrid

Nice, sleek and intuitive. A grid control especially designed for bootstrap.
http://www.jquery-bootgrid.com
MIT License
972 stars 362 forks source link

Need SetCurrentPage functionality #310

Open bedwar2 opened 8 years ago

bedwar2 commented 8 years ago

Links in the bootgrid take the user to another page and then when they come back, I'd like to set the grid back to the page they were originally on. I'm looking for a SetCurrentPage method.

bedwar2 commented 8 years ago

Ok I figured out a way to do what I needed and modified the file locally. I added (under the Grid.Prototype.getCurrentPage function): Grid.prototype.setCurrentPage = function (newPage) { this.current = newPage; loadData.call(this); };

Which can be easily called now by doing: $('#tblLCTList').bootgrid("setCurrentPage", pageNum);

Working like a charm for me. Consider adding this so others can use it.