i have a gridview in my page and a datatable with 1000 rows in it .now i can bind gridview with datatable intwo different ways
- bind datatable directly to gridview.
- create another datatable with first ten rows and bind it to grid. on the next page request bind next 10 rows to gridview.
now my question is, does my second aproach really help me to improve perfomance of the page?
There are two ways to improve the performance in this case:
Enable paging in your GridView
Advantage: easy to implement, you don’t need to change your DataSource
Disadvantage: You need to select all records from dbms
Page the DataSource itself(f.e. SQL-Server)
Advantage: Very fast and scalable
Disadvantage: More time-consuming to implement
With only 1000 rows i would recommend to enable paging in GridView.