how to pass a selection in a datagrid to show another datagrid
<p>I have two gridviews on a page
The first datagrid(requestgrid) is populated by using a stored procedure which has a parameter and that parameter is fed by the querystring.</p>

<p>The other grid in the page only needs to be displayed when i select a row in the first datagrid.Iam able to get the requestid from the selection using below code</p>

<pre><code>void Requesttbl_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("clickrequestid"))
            {

                Requesttbl.Visible = false;
                int requestid = (int)e.CommandArgument;
               }
        }
</code></pre>

<p>My question is how do i use this requestid to pass it as a parameter to the second gridview</p>

<p>below code is my second grid view code in the markup page</p>

<pre><code>&lt;asp:GridView ID="SelectedReports" runat="server" AutoGenerateColumns="False" 
            DataSourceID="showselectedreports" EnableModelValidation="True"&gt;
            &lt;Columns&gt;
                &lt;asp:BoundField DataField="Requestid" HeaderText="Requestid" 
                    SortExpression="Requestid" /&gt;
                &lt;asp:BoundField DataField="rptdesctext" HeaderText="rptdesctext" 
                    SortExpression="rptdesctext" /&gt;
                &lt;asp:BoundField DataField="Completeddt" HeaderText="Completeddt" 
                    SortExpression="Completeddt" /&gt;
                &lt;asp:BoundField DataField="Analyst" HeaderText="Analyst" ReadOnly="True" 
                    SortExpression="Analyst" /&gt;
            &lt;/Columns&gt;
        &lt;/asp:GridView&gt;
        &lt;asp:SqlDataSource ID="showselectedreports" runat="server" 
            ConnectionString="&lt;%$ ConnectionStrings:UnderWritingConnectionString %&gt;" 
            SelectCommand="ShowCustomerSelectedRequests" 
            SelectCommandType="StoredProcedure"&gt;
            &lt;SelectParameters&gt;
how do i use the requestid as a parameter here**strong text**
                           &lt;/SelectParameters&gt;
        &lt;/asp:SqlDataSource&gt;
</code></pre>

<p>Thanks in advance</p>
