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?

Thanks,
TakeoutdinnerAsked:
Who is Participating?
 
arhameConnect With a Mentor Commented:
Or rather, Gridview1.SelectedIndex = 0 for the first row.
0
 
arhameCommented:
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
 
TakeoutdinnerAuthor Commented:
Thanks arthame,
This is the right solution for me.
God bless you!
0
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.