Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ObjectDataSource Number of Rows

Status
Not open for further replies.

Elegabalus

Programmer
Joined
Jan 13, 2005
Messages
71
Location
CA
I'm working with Beta2 of Visual Studio 2005, and I was wondering if there is a way that I can programmatically find the number of rows displayed in a Gridview with an ObjectDataSource?

I want to make a panel invisible if the number of rows is 0, but I'm not sure how to access the number of rows in the gridview.

Any help is appreciated.
 
Hmm...no suggestions?

I've tried using e.affectedrows to find the number of rows, but I can't figure out how to get that to work when the records are just being displayed, instead of updated, or deleted.

Any help is appreciated.
 
I have not used VS2005. In .NET 1.1 you can loop through the rows in the datagrid, or you can do a count of rows in the datatable of the dataset if you are using that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top