• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 230
  • Last Modified:

Determining if data returned to DataGrid

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?
0
jaysch
Asked:
jaysch
  • 2
1 Solution
 
raterusCommented:
This is what you are looking for,

  panel1.visible = (myDataGrid.Rows.Count <> 0)
0
 
jayschAuthor Commented:
Raterus,

IntelliSense says " 'Rows' is not a member of  System.Web.Ui.WebControls.DataGrid"
0
 
raterusCommented:
sorry...the property is "Items" not "Rows"

myDataGrid.Items.Count
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now