views:

513

answers:

2

See title.

Using ObjectDataSource is associated in my mind with quick demos that you can see at conferences and in video tutorials (which typically tells me "don't do it this way in production").
Also I always like to have control over what's going on and when it happens. My other problem with ObjectDataSource is that is's declarative.

Looking forward for your help and opinions.

UPDATE: I'm retrieving only one page of results from the database and the GridView.PageCount is read-only [sic!].

A: 

Yes, you need to define an PageIndexChanged event handler to perform the actual paging of data from your source before binding to the Data Grid, same idea for sorting but with a SortCommand handler.

philjohn
I added an update (additional details) to the question.
Piotr Owsiak
+1  A: 

Yes, I've done this before with an approach similar to this: http://www.codeproject.com/KB/aspnet/GridViewNeatPaging.aspx

Wayne
This looks promising, I'll be looking at it. I wish this was what the default GridView control allowed me to do. Thanks Wayne!
Piotr Owsiak