Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Determine GridView's total rows in Row DataBound event?

Reply
Thread Tools

Determine GridView's total rows in Row DataBound event?

 
 
Craig Buchanan
Guest
Posts: n/a
 
      09-29-2008
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
 
Reply With Quote
 
 
 
 
Reggie
Guest
Posts: n/a
 
      10-02-2008
Craig, Maybe something like:

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

Hope it helps

Reggie

"Craig Buchanan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
databound custom controls vs composite databound custom controls rodchar ASP .Net 0 11-26-2007 03:51 PM
Group By Rows and Total Rows yonialhadeff ASP .Net Datagrid Control 1 01-23-2007 07:44 PM
Gridview row databound event - can't get past the 1st row of gridview maurban@gmail.com ASP .Net 5 10-13-2006 09:37 PM
templated databound control problem - not showing databound Manu ASP .Net Web Controls 0 05-22-2006 09:46 AM
ok I can do a totals row but how about a percentage row after each data row D ASP .Net Datagrid Control 0 05-23-2005 04:10 PM



Advertisments