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

wowjen

Member
Joined
Dec 27, 2009
Messages
13
Programming Experience
Beginner
 
Last edited:

Hack

Well-known member
Joined
Apr 6, 2009
Messages
336
Location
Sterling Heights, MI
Programming Experience
10+
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
 

wowjen

Member
Joined
Dec 27, 2009
Messages
13
Programming Experience
Beginner
wow... great!
thanks a lot sir!
I wish I could give something as a reward!
ahehehe, super thanks for you, it works! ^_^
 
Top Bottom