[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

bind gridview to details view

Posted on 2006-11-09
2
Medium Priority
?
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 2000 total points
ID: 17908164
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
ID: 17911544
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

650 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