• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

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
0
Sreekanth_Nagabandi
Asked:
Sreekanth_Nagabandi
1 Solution
 
Bob LearnedCommented:
Possibility:

1) Create a DataView with a filter to get the selected record

2) Bind the DetailsView to the DataView

Bob
0
 
satish_nagdevCommented:
hi,
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
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now