title: How to fill an inner gridview based on outer gridview selection (ASP.NET/C#)
body: <p>I have 2 GridViews, the InnerGridView is nested inside a TemplateField of my OuterGridView.
  Each GridView has an ObjectDataSource (ODS). I want the InnerGridView to display data that is unique
  to the GroupName that is listed in the OuterGridView. I have been Googling this for weeks,
  seeing various ideas based around RowDataBound and the ODS Selecting event.</p>
  
  <p>I don't think RowDataBound is the answer, because the Selecting event for the InnerGridView ODS
  has already been called when RowDataBound is called for the OuterGridView.</p>
  
  <p>So, I need to send a parameter to the ODS for the InnerGridView:</p>
  
  <pre><code>protected void ProductDataSource_Selecting( object sender, ObjectDataSourceSelectingEventArgs e ) {
          e.InputParameters["productGroup"] = &lt;here I need to access the GroupName from the OuterGridView&gt;;
  }
  </code></pre>
  
  <p>Note: This method is assigned to the Selecting event of the InnerGridView ODS.</p>
  
  <p>My question is: How do I access the GroupName from the OuterGridView... while I am processing the InnerGridView.
  Here is an example of something that does not work: OuterGridView.SelectedRow.FindControl( "GroupName" ).ToString();</p>
  
  <p>I have heard that one can find <em>any</em> control from inside the Selecting event by searching a certain hierarchy.
  But I don't know how to access that hierarchy using the "e" or "sender" parms.
  If I could find an explanation of the various objects and controls... and where they have a valid scope
  and how they are accessed... that would be helpful.</p>
  
  <p>Many thanks, Paul</p>