Is it possible to use custom GridView swap (in ASP.NET, preferably 3.5) without using ObjectDataSource?

See chapter.

Using ObjectDataSource is related to my considerations with quick demos that you can see at conferences and in video tutorials (which usually tell me “don't do it this way in production”).
I also always like to control what happens and when it happens. My other problem with ObjectDataSource is declarative.

We look forward to your help and opinions.

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

+3
source share
1 answer

Yes, you need to define a PageIndexChanged event handler to actually pump the data from your source before binding to the data grid, the same idea for sorting, but using the SortCommand handler.

0
source

Source: https://habr.com/ru/post/1725615/


All Articles