Hi!

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?

thanks!

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.