Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Adding up all the data in a datatable

$
0
0

So basically i have a datatable connected to a dropdown box where the user can select a player and add  or remove them to the datatable using a button. i was wondering if there was a way to also have a button that adds up items in the datatable and displays them on labels? such as like one of the columns is "# of CC" and in that column there will be a number for each player added. the button function when pressed should add up all the data in that collumn and place it in a label or txt box? not sure if that's possible. I also have Boolean values on the datatable and i think it would be cool if i could also add the number of them.

For example one of the columns is "Tank" and it will either be checked or unchecked. i think it would be really cool if the button could also display somthing like "# of tanks = x" or somthing to that affect.  Any help is appreciated, thanks for reading.


james griffith


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>