You must configure the page size in the contructor of the GridServer object in the service method returning the rows to enable paging:
var server = new GridServer<Order>(repository.GetAll(), Request.Query,
true, "ordersGrid", columns, 10);
PageSize is an optional parameter of the GridServer constructor. If you don't want to enable paging you must call the contructor with no parameter:
var server = new GridServer<Order>(repository.GetAll(), Request.Query,
true, "ordersGrid", columns);
No configuration for the static page size is required on the GridClient object
You can configure the grid to enable changes on page size from the Razor page.
You have to enable paging as shown in the section before.
Then you have to use the ChangePageSize method of the GridClient object on the Razor page:
var client = new GridClient<Order>(q => orderService.GetOrdersGridRows(ColumnCollections.OrderColumns, q),
query, false, "ordersGrid", ColumnCollections.OrderColumns, locale)
.ChangePageSize(true);
A user can change the page size writing the new size and pressing the "Tab" or "Enter" keys.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。