How to Change "pageSize" by code?
See original GitHub issueI’m trying to have a little dropdownlist with different values (10,50,100) and when the user select one I would change the pagesize.
<div id="jsgrid"></div><select id="pagelength">
<option>10</option>
<option>50</option>
<option>180</option>
</select>
var selectedPagelength = 15;
$("#pagelength").change(function () {
onPageLenghtSelect($(this).val());
});
function onPageLenghtSelect(newLenght) {
selectedPagelength = newLenght;
$("#instancedata-grid").jsGrid("refresh");
}
$("#instancedata-grid").jsGrid({
autoload: true,
sorting: true,
paging: true,
pageSize: selectedPagelength,
pageButtonCount: 5,
....
Nothing changes. I try “render” instead of refresh… same result. If I recall my $.getJSON it works, but then I when back to the server… I don’t need calling my api to get new data I just want to change the number of line displayed.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
How to set DataPager pagesize in codebehind. - MSDN
DataPager1.PageSize = 10;. Hi, I have tried setting the pager pagesize property to 1. And then in the codebehind, I added for example,...
Read more >Change PDF Page Size Programmatically|Aspose.PDF for Java
PDF for Java lets you change PDF page size with simple lines of code in your Java applications. This topic explains how to...
Read more >How to change dynamically the value in pageSize in Material ...
Hi guys. I'm working in a project where the default value for the pageSize is a fixed number. Now, I need change this...
Read more >angular - How to change the text in the label in pagination?
For label for the page size selector. I tried to do it but did not help: <mat-paginator [pageSizeOptions]="[5, 10, 20]" ...
Read more >HTML vs Body: How to Set Width and Height for Full Page Size
This can be counterintuitive and confusing. For a responsive full page height, set the body element min-height to 100vh. If you set a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Fantastic, it works!
Here what I did:
Yeah that’s what I did. Bad copy paste. and I used the pagerContainer: property instead of the jquery to get the dropdown inside the pager section.