Sreekanth_Nagabandi
asked on
bind gridview to details view
Hi,
I have a grid view. I want to display the selected record from the grid view and bind it to the details view , which is on another page. i wonder if you can tell me how to do this.
Thanks,
Sreekanth
I have a grid view. I want to display the selected record from the grid view and bind it to the details view , which is on another page. i wonder if you can tell me how to do this.
Thanks,
Sreekanth
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
assume table Order & OrderDetails joined by OrderID for the sake of simplicity, say you've order number as key column
now you need to work on SelectedIndexChanged event in that you can access current row selected, just get ordernumber etc value from current row, pass that id to second page using Response.Redirect or Server.Transfer (Redirect is better here i think).
for help see it ==>http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.selectedindexchanged.aspx
hope it helps.
regards,
satish