Solved

Changing Selected Record Programatically ASP.NET

Posted on 2008-10-07
2
195 Views
Last Modified: 2013-12-17
I have a gridview and a formview that I'm using.   I want to be able to have someone select a value from the gridview and have that be the selected record in the formview, but I want them to still be able to iterate through the other records in the formview - I just want the value from the gridview to be the current record.

How do I cause the formview to go to the selected record without completely filtering out the other records?

Thanks.
0
Comment
Question by:pemberley1210
[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 2

Accepted Solution

by:
zwiebele earned 500 total points
ID: 22659452
Try this:

protected void GridView_SelectedIndexChanged(object sender, EventArgs e)
{
      FormView.PageIndex = GridView.SelectedRow.DataItemIndex;
}
0
 

Author Closing Comment

by:pemberley1210
ID: 31503823
Perfect!!! Thanks.
0

Featured Post

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

696 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