Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Checking the gridview status in asp.net 2.0

Posted on 2007-11-27
2
Medium Priority
?
205 Views
Last Modified: 2013-11-07
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?
0
Comment
Question by:jumpstart0321
[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 Comments
 
LVL 22

Accepted Solution

by:
RedKelvin earned 2000 total points
ID: 20362734
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
    }

RedK
0
 

Author Comment

by:jumpstart0321
ID: 20362736
Thanks, I knew it was simple... I just couldn't figure it out:)
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

636 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