.net - how to check if the listView is empty -
im creating windows form , have 2 problems
- i want enable button add item in listview otherwise disable if empty
- assuming have added item in listview. how can totalprice of item , put in label item added? thanks.
this code use compute total price of item in listview
dim total integer = 0 each itemrow listviewitem in me.lvorder.items total += convert.toint32(itemrow.subitems(2).text) next
sorry cant put image better understanding because need 10 reputation post image.
something simple should want:
btnxxx.enabled = (lvorder.items.count > 0)
you need make sure doing in appropriate event(s). or when add or remove items
Comments
Post a Comment