I think you should just link a DetailsView to the GridView's selected index. This would accomplish exactly what you're trying to do, without all the extra work.
Just handle the SelectedIndexChanged event of the GridView, and point your DetailsView's datasource at the ID of the row you've selected. Or, if you're using an SqlDataSource for the DetailsView, you can just use a ControlParameter pointing to the GridView.
General example: You have a GridView, a DetailsView, and the DetailsView is populated by a SqlDataSource. Then you just set up your SqlDataSource to have a ControlParameter that is linked to the selectedValue of the Gridview:
<asp:GridView ID="yourGridView" runat="server" >
...
</asp:GridView>
<asp:DetailsView ID="yourDetailsview" runat="server" DataSourceID="detailsViewDataSource">
...
</asp:DetailsView>
<asp:SqlDataSource ID="detailsViewDataSource" runat="server" ConnectionString="Your connection string"
SelectCommand="SELECT * FROM yourTable WHERE ID = @ID"
<SelectParameters>
<asp:ControlParameter Name="ID" ControlId="yourGridView" PropertyName="SelectedValue"/>
</SelectParameters>
</asp:SqlDataSource>
If you are not using an SqlDataSource, you need to handle the GridView's SelectedIndexChanged event, and then bind the DetailsView (using the new SelectedValue of your GridView) to the record you need using whatever databinding process you'd like.