Im working on a really simple client server app

I have a windows forms which is connected to ms sql db using string conn

a dataset and a data adapter

presented in a datagridview in a form

in my table, theres a column for price

what i want to know is:

at the end of the last record for price

theres an extra datagrid cell where I can place a total of all the prices

how can I do it?

do i have to bound the sum? or can i just do it unbounded?

can you give me a sample?


5 Years
Discussion Span
Last Post by anthonyjpv

can you make a bit clear your question ..your datagrid will show all the column bound to the table so do you have a field for price ? if yes..then you can update the total price in that column in update option and read using gridview..


no. i dont have a column for total price. what i want to have is to add a new row in datagridview that will allow me to insert a total price.


I got the logic on how to add up all of the values in a specified column and show the answer to a textbox. what i want to do now is to insert this answer to the last row of a datagrid say price column. thanks!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.