Solved

Changing Selected Record Programatically ASP.NET

Posted on 2008-10-07
2
190 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
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

758 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

20 Experts available now in Live!

Get 1:1 Help Now