Select Gridview for Formview Display

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?

Who is Participating?
arhameConnect With a Mentor Commented:
Or rather, Gridview1.SelectedIndex = 0 for the first row.
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

TakeoutdinnerAuthor Commented:
Thanks arthame,
This is the right solution for me.
God bless you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.