title: Get the total number of master rows and grouped rows in a DevExpress GridControl
body: <p>In a <a href="https://stackoverflow.com/questions/8916755/how-to-find-the-number-of-expanded-collapsed-master-rows-and-grouped-rows-in-a-d/8941619#8941619">previous question</a> I posted I found out how to keep track of the currently expanded grouped rows by using 2 events:</p>
  
  <pre><code> - gridview.GroupRowExpanded
   - gridview.GroupRowCollapsed
  </code></pre>
  
  <p>where I increase or decrement an integer that keeps track of how many group rows are currently expanded. I am now tackling the problem of what to do if the user expands or collapses all of the group rows. I currently know when this is done by checking the <code>e.RowHandle</code>. </p>
  
  <p>I was wondering if there is a way to find the total number of groups rows currently in the GridView (something like rowcount for normal rows) so I know how many to set the tracking integer to.</p>
  
  <p>For Example: </p>
  
  <ul>
  <li>If my current count is 2 and the total number of groups are 15 then when the Expand All is fired the current count is set to 15 rather than 3.</li>
  </ul>