listview and euro

fifiddu70

Well-Known Member
Licensed User
Longtime User
Hello everyone, and by the time I work in an interesting project management, this application uses a sql database where the user can store the items you through a listview the user adds the selected products and eventually sends them to the printer. Now I wonder if you can add the cost in euro to each item included in the listview, some are able to make sure to add the cost for each item, then click the listview displays the item and the cost in euro, while the total of each item is displayed in a EditText, my question is this: how do I remove the cost of a single item from the listview and simultaneously see the cost on EditText without without the cost of the canceled?
I hope I was clear.
thanks

B4X:
Sub listview_ItemClick (Position As Int, Value As Object)
   ListView.RemoveAt(Position)
    'to deduct the cost of a single item from the listview?
        
End Sub
B4X:
' currently do it this way
Sub listview_ItemClick (Position As Int, Value As Object)
   ListView.RemoveAt(Position)
   txttotaleeuro.text = txttotaleeuro.Text - txteuro.Text
   val = 0
   txteuro.Text = val
End Sub
 

mc73

Well-Known Member
Licensed User
Longtime User
You can use addSingleLine2, parse the value in euros as returning value and subtract it from your total inside the itemClick event.
 
Upvote 0

fifiddu70

Well-Known Member
Licensed User
Longtime User
mc73 sorry I posted the wrong message on this post, the wrong message belongs to another post
 
Upvote 0
Top