c# windows forms link button to listview
Posted
by Richard
on Stack Overflow
See other posts from Stack Overflow
or by Richard
Published on 2010-05-20T08:23:28Z
Indexed on
2010/05/20
8:30 UTC
Read the original article
Hit count: 513
Hi,
I am using c# windows forms. I have multiple buttons linked to a listview which when a button is pressed, a new item is added to the listview. The column headers in the listview are 'Name' and 'Amount'. When a different button is pressed, a different item is added to the listview. The thing i need help with is as follows: When the same button is pressed twice, I want the amount to go from "1" to "2" on the second click. So the item name isnt duplicated but the amount is increase. The problem is I am using text to link the button to the linklist at the moment e.g. ("Coca Cola", "1") which adds the item name as coca cola and the amount as 1. I know it is something to do with integers so please help!!
Thanks
© Stack Overflow or respective owner