Checking the gridview status in 2.0

Upon the page_load event, I just need to check if the gridview actually populated with anything. Assuming my gridview is named GridView1, what would be the code for this?
Who is Participating?
RedKelvinConnect With a Mentor Commented:
Hi there,

It is as simple as checking if there are any rows, like this

    If Me.GridView1.Rows.Count > 0 Then
      'Rows exist
    End If

or in C#

    If (this.GridView1.Rows.Count > 0)
      //Rows exist

jumpstart0321Author Commented:
Thanks, I knew it was simple... I just couldn't figure it out:)
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.