title: How can I get the IQueryable object used by LinqDataSource?
body: <p>Is there a way to get the IQueryable object that the LinqDataSource has used to retrieve data?  I thought that it might be possible from the <strong><em>selected</em></strong> event, but it doesn't appear to be.</p>
  
  <p>Each row in my table has a category field, and I want to determine how many rows there are per category in the results.</p>
  
  <p>I should also note that I'm using a DataPager, so not all of the rows are being returned.  That's why I want to get the IQueryable, so that I can do something like</p>
  
  <pre><code>int count = query.Where(i =&gt; i.Category == "Category1").Count();
  </code></pre>