Hi how i can manage datagrid but instead of client side pag use server side pagination? right now im loading a sql table with 50k, i dont like to see all 50k records,i will like to only display lets say 200 records per page. Any tips?
note: i know SQL server have an option in the select query to add a LIMIT and OFFSET i think
thank you
2 Answers, 1 is accepted
Hello Alexis,
The Paging mechanism of the RadGridView will be applied to the items from the control DataSource property. For example, you have created a query that returns a collection of 50 items. This collection is applied to the RadGridView DataSource property. If we set the PageSize property to 10, you will get 5 pages with 10 items per page. The pagination mechanism will be applied on the client side.
Regards,
Dinko | Tech Support Engineer
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
You can check the Paging Panel help article in our documentation. The article describes the paging control structure. Through the PagingPanelElement property, you can get access to each element in the panel. For example:
radGridView1.GridViewElement.PagingPanelElement.FirstButton
Then you can customize the buttons per your requirement.
You can use the Font property of the PagingPanelElement:
radGridView1.GridViewElement.PagingPanelElement.Font = new Font(radGridView1.GridViewElement.PagingPanelElement.Font.FontFamily,18);
Here is the result:
Hi Alexis,
You could check this forum thread where similar behavior was discussed. In a few words, RadGridView doesn't offer server-side paging functionality. You could consider using RadVirtualGrid control as suggested in the forum.
Regards,
Dinko | Tech Support Engineer
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.