Solved

bind gridview to details view

Posted on 2006-11-09
2
213 Views
Last Modified: 2008-03-04
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
Comment
Question by:Sreekanth_Nagabandi
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
Comment Utility
Possibility:

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

2) Bind the DetailsView to the DataView

Bob
0
 
LVL 4

Expert Comment

by:satish_nagdev
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now