logo
Welcome to our new AbleCommerce forums. As a guest, you may view the information here. To post to this forum, you must have a registered account with us, either as a new user evaluating AbleCommerce or an existing user of the application. For all questions related to the older version of Gold and earlier, please go to AbleCommerce Gold forum. Please use your AbleCommerce username and password to Login. New Registrations are disabled.

Notification

Icon
Error

Options
Go to last post Go to first unread
judy at Web2Market  
#1 Posted : Tuesday, February 21, 2023 9:27:43 AM(UTC)
judy at Web2Market

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

Wanna join the discussion?! Login to your AbleCommerce Forums forum account. New Registrations are disabled.

nadeem  
#2 Posted : Tuesday, February 21, 2023 11:04:33 AM(UTC)
nadeem

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 ShowCountLabel
options.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!
thanks 1 user thanked nadeem for this useful post.
judy at Web2Market on 2/22/2023(UTC)
Users browsing this topic
Guest
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.