tgarageequipgafm
New Member
I've got a query to display parts by serial numbers in one column and the number of processes they went through in the other column.This data is dumped into a GridView control called \[code\]gvSummary\[/code\]. It works OK now.What I'd like to do is add a second GridView control called \[code\]gvDetails\[/code\] next to \[code\]gvSummary\[/code\], and replace all of the data in \[code\]gvSummary\[/code\] with a control that will run a detail query for that particular part when it is clicked.My plan of attack is to replace the text in the \[code\]Serial_Number\[/code\] column (Column[0]) with something like the HyperLink control, where the \[code\]NavigateUrl\[/code\] specifies to call my GetDetails method by passing the text of the \[code\]Serial_Number\[/code\].\[code\]var table = GetPartsForTimePeriod();for (int i = 0; i < table.Rows.Count; i++) { string serialNumber = table.Rows[0].ToString().Trim(); var link = new HyperLink() { ID = string.Format("lnk{0}", serialNumber.Replace(' ', '_')) }; link.Text = serialNumber; link.NavigateUrl = string.Format("GetDetails(\"{0}\"}", serialNumber); table.Rows[0] = link;}GridView1.DataSource = table;GridView1.DataBind();\[/code\]Issues:A HyperLink would require a page to load, and all I really want to do is fill this next query into the \[code\]gvDetails\[/code\] control.What is the right way to go about this? I generally code WinForms, and I can't think of the way to do this in ASP.NET.