Pretty simple task but this will take multiple steps as you have several ?'s here.
First lets tackle the gridview > detailsview... I am assuming that you are using either VWD Express or VS...
that should be easy man. Just make one of your column a hyperlink and pass the ID of your record to the hyperlink, that's all, then request the parameter in your details view
Example, however this one is moving to another page... but what you could do since you want to use AJAX would be to add in the partial page update here once the hyperlink is selected...
<asp:GridView ID="LateMileStonesGridView"
Caption = "Late"
runat="server"
AutoGenerateColumns="False"
AllowSorting="True"
CssClass="grid"
DataKeyNames="MilestoneID"
>
<columns>
<asp:TemplateField>
<ItemTemplate>
<a href="detail.aspx?milestoneid=<%#Eval("MilestoneID")%>"><%#Eval("MilestoneID")%></a>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="MilestoneTitle" HeaderText="Title" SortExpression="Title" />
</columns>
</asp:GridView>
As
you can see, the first column of the grid is a "TemplateField" where I
can have anything in the column I want (in this case, it's a regular
hyperlink). I pointed the hyperlink to "detail.aspx" page with a
parameter "milestoneid". So far so good? and I pass the parameter a
value of the id in the current row.
Now in details.aspx's Page_Load function, I get the "milestoneid" parameter like so
protected void Page_Load(.....)
{
if(!Page.IsPostBack)
{
String milestoneid = Request["milestoneid"];
// use data access to retrieve teh detail based on the milestoneid
}
}
Remember to "Mark As Answer" if this post has helped you! Thanks....
And I say unto you, Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you...
LK 11:9
http://adventwebdesign.net