Determining if data returned to DataGrid

Posted on 2005-03-28
Medium Priority
Last Modified: 2010-04-07
I have to turn a panel containing a datagrid plus other elements to panel1.visible = false if no data is returned to the datagrid. Is there a datagrid property I can use to do this: If datagrid.someproperty = 0 or false then panel1.visiable = false?
Question by:jaysch
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
LVL 33

Expert Comment

ID: 13646584
This is what you are looking for,

  panel1.visible = (myDataGrid.Rows.Count <> 0)

Author Comment

ID: 13646942

IntelliSense says " 'Rows' is not a member of  System.Web.Ui.WebControls.DataGrid"
LVL 33

Accepted Solution

raterus earned 400 total points
ID: 13646972
sorry...the property is "Items" not "Rows"


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
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.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

743 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