PC Review


Reply
Thread Tools Rate Thread

How to count total number of rows in the datagrid.

 
 
=?Utf-8?B?cGF0YW5n?=
Guest
Posts: n/a
 
      31st Mar 2005
I found the following to count the total number of VISIBLE rows of datagrid

datagrid.visiblerowcount

How do we count the total number of ACTUAL (not just visible) rows of
datagrid?

Thanks in advance.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RGFuaWVsIENoLiBCbG9jaA==?=
Guest
Posts: n/a
 
      31st Mar 2005
Actual, I did not see a method or property to use for, but as a datagrid
always has a datasource behind, just ask for the number of rows in your
datatable, dataview or whatever you use as datasource - it will give you the
total number of rows...

Daniel

"patang" wrote:

> I found the following to count the total number of VISIBLE rows of datagrid
>
> datagrid.visiblerowcount
>
> How do we count the total number of ACTUAL (not just visible) rows of
> datagrid?
>
> Thanks in advance.

 
Reply With Quote
 
=?Utf-8?B?cGF0YW5n?=
Guest
Posts: n/a
 
      31st Mar 2005
In my code, I am connecting to the datasource and after the data is copied to
the datagrid I am closing the connection.

DataGrid1.DataSource = ds.Tables("Employee")

Now I want to SUM the values of a particular column in the datagrid. So I
was thinking If I know the total number of rows in the datagrid, I could have
added the values of all the rows by running a loop or something...

Could you please tell me the right direction





"Daniel Ch. Bloch" wrote:

> Actual, I did not see a method or property to use for, but as a datagrid
> always has a datasource behind, just ask for the number of rows in your
> datatable, dataview or whatever you use as datasource - it will give you the
> total number of rows...
>
> Daniel
>
> "patang" wrote:
>
> > I found the following to count the total number of VISIBLE rows of datagrid
> >
> > datagrid.visiblerowcount
> >
> > How do we count the total number of ACTUAL (not just visible) rows of
> > datagrid?
> >
> > Thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Count Total Number sajith Microsoft Excel New Users 1 3rd Oct 2008 06:21 PM
Index 2 is not non-negative and below total rows count. =?Utf-8?B?TUc=?= Microsoft ADO .NET 1 16th Jun 2005 09:07 PM
Index 0 is not non-negative and below total rows count =?Utf-8?B?Y2xhdXNjaGM=?= Microsoft Dot NET 1 24th May 2005 11:54 AM
I am adding a new row to the datagrid dynamically but if i use the Count property of Item it is not showing the count of the new rows being added Praveen Balanagendra via .NET 247 Microsoft ASP .NET 2 6th Jun 2004 08:16 AM
total record count in datagrid DC Gringo Microsoft ASP .NET 2 4th Mar 2004 07:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:36 PM.