Hi everyone
I'm working with a listview (I know that I must not be working with a lv but a clv but I guess If I work wit a CLv I'd have the same issues)
I fill it by adding addTwoline with spinners value (spName and spPrice)
and it's woriking fine...but what I can't do is to sum all that spPrice values in the Listview to get a Total of all that items
I've been working by adding all items to a list in order sum all later but I can't get (I don't know how to do it) each spPrice item
I just get the spName values not spPrice values
I've done a Sub that sum all that item but that executes itself on the spPrice_ItemClick and working fine but I know I need a "function" out that event because when I remove items I need that sum items left.
I'll appreciate it if someone can help me with this. Thank you in advance
I'm working with a listview (I know that I must not be working with a lv but a clv but I guess If I work wit a CLv I'd have the same issues)
I fill it by adding addTwoline with spinners value (spName and spPrice)
B4X:
LV1.AddTwoLines(spName.SelectedItem,SpPrice.SelectedItem)
and it's woriking fine...but what I can't do is to sum all that spPrice values in the Listview to get a Total of all that items
I've been working by adding all items to a list in order sum all later but I can't get (I don't know how to do it) each spPrice item
I just get the spName values not spPrice values
I've done a Sub that sum all that item but that executes itself on the spPrice_ItemClick and working fine but I know I need a "function" out that event because when I remove items I need that sum items left.
B4X:
lbltotal.Text = "$: 0,00"
value1 = SpPrice.SelectedItem
value2 = value2 + value1
Log(value2)
lbltotal.Visible = True
Total = value2
lbltotal.Text = "Monto Total $: "&Total
I'll appreciate it if someone can help me with this. Thank you in advance