Select Gridview for Formview Display

Posted on 2008-06-23
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?

Question by:Takeoutdinner
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

Expert Comment

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


Accepted Solution

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

Author Closing Comment

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

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

626 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