Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

RadGrid model binding calling SQL twice

$
0
0

I'm seeing two calls to my SelectMethod as well. I set a break point in the debugger and it's hit twice every time I do a fresh load of the page. At first I thought it was because I had if (!IsPostBack) DataBind(); in my Page_Load method. However, I commented that out and found that it is still calling the method twice. Unless I can stop this from happening, it will for all practical purposes make using model binding unacceptable. I have lots of grids all over the place in my application. I can't afford to be executing two queries everywhere only one query is needed. I think it's unfortunate that Telerik doesn't seem to place much importance on getting model binding to work with the grid.

 Another thing I've noticed is that although the SelectMethod returns an IQueryable<T>, it doesn't apply sorting, filtering, and paging at the database-level. IMHO, this should all happen transparently. Instead, RadGrid reads the entire data set into memory and then does the filtering. Model binding with RadGrid could work much better IMHO. I really wish Telerik would prioritize this and put some resources into making it work the way it should work.


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>