AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
GridRenderOptions hide page number selection
Rank: Advanced Member
Groups: Developers
Joined: 11/7/2018(UTC) Posts: 303
Thanks: 21 times Was thanked: 5 time(s) in 5 post(s)
|
I'm working on pages in the admin. Is there a way we can hide the dropdown to change the page size? For example, I want it to be 50 and not changeable. Thanks
|
|
|
|
Rank: Advanced Member
Groups: Administrators, Developers, Registered, HelpDesk, Authorized User, Admin, System Joined: 10/11/2018(UTC) Posts: 110
Thanks: 19 times Was thanked: 18 time(s) in 18 post(s)
|
There is no out of the box option to hide Page Size. However, you can achieve this in two ways: 1. Either use the CSS to hide e.g. Code:.able-grid-header .page-size-panel {
display: none;
}
2. OR you can add a new option e.g. ShowPageSize boolean property inside Grid.cs file and use that to hide the page size similar to ShowCountLabeloptions.ShowCountLabel = true; You can set the page size value from default 20 to 50 from code. For example, for products grid, you can update the action parameter from Code:public ActionResult ListProducts(string modelData = "", string sortExpression = "LastModifiedDate DESC", int page = 1, int pageSize = 20)
to Code:public ActionResult ListProducts(string modelData = "", string sortExpression = "LastModifiedDate DESC", int page = 1, int pageSize = 50)
Hope this helps!
|
1 user thanked nadeem for this useful post.
|
|
|
AbleCommerce Forums
»
AbleCommerce
»
General Questions
»
GridRenderOptions hide page number selection
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.
Important Information:
The AbleCommerce Forums uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close