Determine GridView's total rows in Row DataBound event?

  • Thread starter Thread starter Craig Buchanan
  • Start date Start date
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
 
Craig, Maybe something like:

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

Hope it helps

Reggie
 
Back
Top