title: Row Count for GridView with paging
body: <p>So I have user controls with GridView tables. I have more tables that are much bigger than this one and have paging enabled, but I'm using this as an example. I want each table to display like this one, where a table with a hundred rows will say "Showing: 1 - 10 of 100" on the first page, "Showing: 11 - 20 of 100" on the second, etc. </p>
  
  <p><img src="https://i.stack.imgur.com/AYGRA.png" alt="enter image description here">
  This is how it is coded now (in my html file):</p>
  
  <pre><code>&lt;div id="WebsiteHitsMacro"&gt;
       &lt;umbraco:Macro ID="Macro303" Alias="WebsiteHitsControl" runat="server"&gt;&lt;/umbraco:Macro&gt;
  &lt;/div&gt;
  &lt;div class="ui-widget-header ui-state-default ui-corner-bl ui-corner-br ui-helper clearfix bottom"&gt;
      &lt;div class="dataTables_info" id="websitehits_info"&gt;Showing: 1-6 of 6&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Here's the ascx code:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
     DataSourceID="SqlDataSource1" CssClass="dataTable" AllowPaging="True" 
     AllowSorting="True"&gt;
     &lt;AlternatingRowStyle CssClass="altrow" /&gt;
     &lt;HeaderStyle CssClass="ui-state-default" /&gt;
     &lt;Columns&gt;
     &lt;asp:BoundField DataField="id" HeaderText="id" SortExpression="id" /&gt;
     &lt;asp:BoundField DataField="name" HeaderText="name" SortExpression="name" /&gt;
     &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>I don't know how to get the row count in the first place. Is it possible to have it display in the div I have here? </p>
  
  <p>I hope this makes sense. Thanks.</p>