title: ObjectDataSource Paging -> no data displayed in GridView
body: <p>i have an objectdatasource and a gridview configured as shown below (using VS2008 w/ .NET3.5):</p>
  
  <pre><code>    &lt;asp:ObjectDataSource ID="odsMainData" runat="server" EnablePaging="True" OldValuesParameterFormatString="original_{0}"
          SelectMethod="GetMainData" TypeName="ErrorViewer.Model.ErrorViewModel" 
          SelectCountMethod="CountMainData"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:Parameter Name="maximumRows" Type="Int32" /&gt;
              &lt;asp:Parameter Name="startRowIndex" Type="Int32" /&gt;
          &lt;/SelectParameters&gt;
      &lt;/asp:ObjectDataSource&gt;
      &lt;asp:GridView ID="grdMainData" runat="server" AllowPaging="True"             DataSourceID="odsMainData" PageSize="15" AllowSorting="True"&gt;
      &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>There are no eventhandlers or other code in the code behind for the gridview or the datasource</p>
  
  <p>So there are methods in the underlying class "ErrorViewModel":
          public DataTable GetMainData()
          {
              var dt = provider.MainData();
              myMainData = dt;
              return dt;
          }</p>
  
  <pre><code>    public DataTable GetMainData(int maximumRows, int startRowIndex)
      {
          var dt = provider.MainData();
          myMainData = dt;
          return dt;
      }
  
      public long CountMainData()
      {
          var count = provider.GetMainDataCount();
          return count;
      }
  
      public long CountMainData(int maximumRows, int startRowIndex)
      {
          var count = CountMainData();
          return count;
      }
  </code></pre>
  
  <p>What I want: custom server side paging.
  What is the problem:
  When I set EnablePaging=true in the datasource, there will be no data displayed in the gridview. If EnablePaging is set to false, there is data displayed. As you can see, the two methods for retrieving the data will do exactly the same. 
  Debugging shows, that there are rows returned when using EnablePaging=true.
  Another Strange thing (using EnablePaging=true):
  in GetMainData maximumRows is set to 15 and startRowIndex to 0 
  in CountMainData maximumRows is set to 0 and startRowIndex to 0 </p>
  
  <p>I've implemented this type of custom paging in another project and did the same configuration - but this time it resides in this strange behavior. What is wrong in my implementation? Did i just forgot one little setting? Any suggestions?</p>