Determine GridView's total rows in Row DataBound event?

C

Craig Buchanan

Is there a way to determine the total number of records that will be bound to a
GridView during the row's dataBound event? considering all of the types of data
objects that can be bound to the gridView, there doesn't seem to be a consistent
way to test the data source.

Insights appreciated.

Craig Buchanan
 
R

Reggie

Craig, Maybe something like:

dvwData = dstData.Tables(strView).DefaultView
dgrdData.DataSource = dvwData
intRowCount = dstData.Tables(0).Rows.Count

Hope it helps

Reggie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top