-1

I have used GridView paging with efficient paging. Which means just extract required records from database. GridView's efficient paging just works in markup. When you use code behind for controlling paging mechanism, it would not efficient any more.

Is there any ASP.NET control that support efficient paging via code behind?

Afshar Mohebi
  • 10,479
  • 17
  • 82
  • 126

2 Answers2

1

If you want to have full control on the data access you should plan to write your own stored procedures which accept among other parameters (usually filter criterias), PageSize and PageIndex.

then whatever component you use in the User Interface you will always need to specify the page index and page size when calling the database.

I am convinced that also LINQ to SQL and MS Entity Framework are able to do this for you in a way or another, the point is not only about a UI control but in the whole chain from database to UI, going through Business Logic and Service Layer, if present.

Component vendors like Telerik and DevXpress have their own Grid Controls with some of this logic already implemented, look at this link and scroll down to the end, they show the diagram on how data is loaded from the database in a paged way, what you see on the left is the classic grid control which loads all data and only shows one page in the user interface, on the right you see what you are looking for and with different details (I don't like the limitation of having to use XPO from DevXpress as ORM for example), you should be able to do this with different components and technologies as well (like LINQ, EF...)

http://www.devexpress.com/Products/NET/Controls/ASP/Grid/server-mode.xml

Davide Piras
  • 43,984
  • 10
  • 98
  • 147
  • Thanks for reply. Currently I have all `sp` and `NHibernate` query for paging data. They all accept necessary parameters for paging. – Afshar Mohebi Sep 17 '11 at 13:17
-1

I found one control for it: DataGrid. It works as I wanted.

Afshar Mohebi
  • 10,479
  • 17
  • 82
  • 126