How to add total in datagridview

A

amit.vasu

Hi

I am using visual studio 2005 windows forms to create an application.
The heart of the application is datagridview which reads the data from
the database and display result to the user.

Now the data is numeric value and Some column needs to add total of the
column at the bottom of the datagrid.

I am binding datagrid to the dataset and then tryiing to add a row to
the datagrid but it is throwing exception saying

"row can not be programmatically added to the datagridview's row
collection when the control is databound"

Any Idea how can I display sum of the columns in the datagridview
control?

Any help would be highly appreciated.

Regards

Amit
 
H

Hushpappy

I had a problem like this too, I managed to solve it using a label and
just put the
rows.count there...
 

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

Top