Solved

Select Gridview for Formview Display

Posted on 2008-06-23
3
424 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
[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
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

Independent Software Vendors: 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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

732 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