DefaultGridPageSize

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
Hi every body.
I want to know how to read DefaultGridPageSize setting from Setting Table in this code
in the List.chtml(for admin => NewsController)

var defaultGridPageSize = ProjectObjectFactory.Container.GetInstance<AdminAreaSettings>().DefaultGridPageSize;
Where call the GetSettingByKey method from database?!

How to initialize DefaultGridPageSize value !!!!!

thanks.
[Best Regards]
7 лет назад
Hi.
You can initialize this setting using
_settingService.SetSetting("adminareasettings.defaultgridpagesize", value)
in code. Or you can set it on the admin panel, just find by "defaultgridpagesize" keyword.
7 лет назад
Hi dear.
Thanks for your reply.
Yes,I know.but my issue is that where is read DefaultGridPageSize value from database in nopcommerce.
I don't see any where that read this value from database in nopcommerce!

Thanks.
[Best Regards]
7 лет назад
Hamidnch wrote:
Hi dear.
Thanks for your reply.
Yes,I know.but my issue is that where is read DefaultGridPageSize value from database in nopcommerce.
I don't see any where that read this value from database in nopcommerce!

How to get the defaultGridPageSize value from the database, by this script?!
var defaultGridPageSize = EngineContext.Current.Resolve<Nop.Core.Domain.Common.AdminAreaSettings>().DefaultGridPageSize;

"EngineContext.Current.Resolve" how to get defaultGridPageSize value?!
Thanks.
[Best Regards]
[u][/u]
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.