peterpiper
Member
- Joined
- Nov 6, 2013
- Messages
- 5
- Programming Experience
- Beginner
I have the following piece of code which gets the sum of a column
in a listView and displays the value in a label on a c# form.
How can I get the sum of three columns and then display the values
in three labels on the forms. If someone can show me how to achieve this
Let me know if question is not clear
in a listView and displays the value in a label on a c# form.
C#:
Decimal iSum = 0;
foreach (ListViewItem o in this.listView3.Items)
{
iSum = iSum + Convert.ToDecimal(o.SubItems[1].Text);
}
label2.Text = iSum.ToString();
in three labels on the forms. If someone can show me how to achieve this
Let me know if question is not clear