Hi,
I select S.No, name and mark from sql database table. This table contain n number of rows. I want to add(+)/Plus the mark and display in the (n+1) row of datagridview how can i do this.
Thank You

So each row is (n + (n-1)), building on top of itself right? Couldn't you just for loop through each row in the table and just take the current row's value and add it to the lasts (you would of course then need an extra column).

You could check the mark to see if it's '-', then times then multiple the value for the nth row by -1, and then add it.

This snippet (to be found here on DaniWeb) is perhaps not exactly what you want, but you surely can get some ideas out of it.

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.