Question How to get the value of the whole column in a listview

wowjen

Member
Joined
Dec 27, 2009
Messages
13
Programming Experience
Beginner
2l8c29e.jpg
 
Last edited:
Try
VB.NET:
Private Sub butAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butAdd.Click
        Dim dblTotal As Double
        Dim i As Integer = 0
        Dim db1Price As Double
        Dim strPrice As String

        For i = 0 To ListView1.Items.Count - 1
            strPrice = ListView1.Items(i).Subitems(4).Text
            db1Price = Double.Parse(strPrice)
            dblTotal += db1Price
        Next
        MessageBox.Show(dblTotal.ToString)
End Sub
 
wow... great!
thanks a lot sir!
I wish I could give something as a reward!
ahehehe, super thanks for you, it works! ^_^
 

Latest posts

Back
Top