title: DevExpress ASPxGridView with Large Data
body: <p>I'm fixing up a website which makes extensive use of the DevExpress ASPxGridView control to search against tables on a SQL Server. The results are then paged and parsed. Some of the search results can be fairly large and I suspect in those cases the built in pager for the ASPxGridView with the native SqlDataSource is prohibitively slow. On one query I observed the network traffic between the SQL Server and the IIS Server to be 1.5 GB over the span of just under a minute. Running the same query with an ORDER BY (SELECT NULL) OFFSET x ROWS FETCH NEXT y ROWS ONLY took a split second. Taking advantage of this SQL side paging on the control is another matter.</p>
  
  <p>It seems my limitations and trade offs are the following:</p>
  
  <ol>
  <li>The DevExpress ASPxGridView built in pager can't have the number of items explicitly set.</li>
  <li>The independent DevExpress ASPxPager doesn't support client side events.</li>
  <li>Replacing the SqlDataSource with LinqServerModeSource or XpoDataSource still has to parse the entire result set from the SQL Server to get the full count and will probably suffer the same performance issues.</li>
  </ol>
  
  <p>I would like suggestions if any of following are possible solutions:</p>
  
  <ol>
  <li>Is there any way to force the DevExpress ASPxGridView built in pager to use an external count?</li>
  <li>Is there any way to wrap the DevExpress ASPxPager with say an Asp.Net UpdatePanel or DevExpress ASPxCallbackPanel to support client side events?</li>
  <li>Can the LinqServerModeSource or XpoDataSource collect results from the SQL query as the ASPxGridView is paged with the total count provided by other means?</li>
  </ol>