Question

I ran the same code for RadGrid and Gridview and result is the same for both. However, when I look at the SQL profiler I see that RadGrid calls the query for 3 times. On the other hand Gridview only calls it once. I am wondering that the reason is. I looked at many sources however could not find anything yet. If you guys have any idea why would that be, please let me know - See attached file for the screenshot of the code and SQL Profiler.

http://tinypic.com/r/116ul39/6

Était-ce utile?

La solution

I think I found the reason that cause that multiple class. When I use RadGrid, what it does is

  • It calls all of the data to display field
  • It calls it again to find out paging counts then
  • It calls it again for filtering and such

on the other hand, when I use GridView and pass the datasource I can make one call to DB to get the same result.

Cheers,

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top