Hello Everyone,

This time i am not asking for any help :-)

I am showing anybody ,who wants to know how to add a $ sign into any item/subitem in Listview.

Did try to add colour,BUT, there is a BUG in VS. you can code for differant colours in subitems,BUT the BUG will not show these colours.

And now back to what I was talking about..hehehe

   For N As Integer = 0 To LV1.Items.Count - 1
            LV1.Items(N).SubItems(7).Text = "$" & LV1.Items(N).SubItems(7).Text

The above code, will insert the "$" symbol into the 7 column in your Listview. That is what i wanted, all you have to do is change the column number , to what ever column you want.
Of course it could be any symbol that you want to insert.....

What I did was fill the ListView first and then, just add the "$" symbol afterwards.

Hope somebody find this usefull, this is what I have been playing around with this afternoon.

1 Year
Discussion Span
Last Post by westsiderailway

You can use Format() function to attach a $ or Currency Symbol before the value.
It should be like

For N As Integer = 0 To LV1.Items.Count - 1
   LV1.Items(N).SubItems(7).Text = String.Format("{0:C}", Val(LV1.Items(N).SubItems(7).Text))

Hope it can help you.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.