?
Solved

bind gridview to details view

Posted on 2006-11-09
2
Medium Priority
?
222 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

Industry Leaders: 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

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month11 days, 13 hours left to enroll

752 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