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.
|