Solved

Select Gridview for Formview Display

Posted on 2008-06-23
3
403 Views
Last Modified: 2013-11-26
Hi experts,

I have Gridview and Formview.
When I select Gridview Row, it displays its Formview.
Here I have 10 rows in Gridview. Until I select any row of Gridview, Formview doesn't display.
I want to select first row as default when I enter this screen. How can I do it?

Thanks,
0
Comment
Question by:Takeoutdinner
  • 2
3 Comments
 
LVL 8

Expert Comment

by:arhame
ID: 21855575
Something similiar to the following would work.


Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        GridView1.SelectedIndex = 1

    End Sub

Open in new window

0
 
LVL 8

Accepted Solution

by:
arhame earned 100 total points
ID: 21855579
Or rather, Gridview1.SelectedIndex = 0 for the first row.
0
 

Author Closing Comment

by:Takeoutdinner
ID: 31469792
Thanks arthame,
This is the right solution for me.
God bless you!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
I designed this idea while studying technology in the classroom.  This is a semester long project.  Students are asked to take photographs on a specific topic which they find meaningful, it can be a place or situation such as travel or homelessness.…

939 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

10 Experts available now in Live!

Get 1:1 Help Now