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!].
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.
精彩评论