Grid View for ASP.NET Web Forms - How to bind the grid to an ObjectDataSource and enable server-side paging
The example demonstrates how to create ObjectDataSource with select parameters to allow ASPxGridView to perform paging and sorting using SQL queries to a database server.
The ObjectDataSource object supports SelectCountMethod
and SelectMethod
methods. Implement the methods to return the number of all records and records for the current page.
To enable server-side paging, set the DataSourceForceStandardPaging property to true
.
Note that in this case, our advanced paging capabilities are turned off and the following grid features are not supported: summary calculation, data grouping, data filtering, unbound data (unbound columns), compound (complex) properties, endless paging mode, and conditional formatting.
- Products.cs (VB: Products.vb)
- Default.aspx (VB: Default.aspx)
(you will be redirected to DevExpress.com to submit your response)