Avatar of Jack_Jones
Jack_Jones

asked on 

Visual Basic ListView

Is it possible to set format to the different colums, for example $ & % values?

Here is what I have that is working, just need to format the colums. This takes data from an excel sheet, but only gives the values and no formatting. Thanks

ListView1.Items.Add(oSheet.Range("A3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("D3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("F3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("G3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("I3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("N3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("R3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("V3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("Y3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("Z3").Value)
        ListView1.Items(0).SubItems.Add(oSheet.Range("AA3").Value)

Open in new window

Visual Basic.NET

Avatar of undefined
Last Comment
Jack_Jones
Avatar of Deepak Lakkad
Deepak Lakkad
Flag of India image

are you displaying data in tabular format ?

Avatar of Deepak Lakkad
Deepak Lakkad
Flag of India image

If yes, I think DataGridView will be a good option rather then Listview.
Avatar of Jack_Jones
Jack_Jones

ASKER

Well I couldn't get a datagridview to work ;(, but got the listview to work good.
Avatar of Jack_Jones
Jack_Jones

ASKER

Would I just hide the table, and just impliment a datagridview to pickup the items?
Avatar of Deepak Lakkad
Deepak Lakkad
Flag of India image

what is your requirement?
ASKER CERTIFIED SOLUTION
Avatar of MTroutwine
MTroutwine
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Jack_Jones
Jack_Jones

ASKER

MTroutwine,

 I found the excel method on here under searching solutions. So I am really limited on how else to do it.
Avatar of Jack_Jones
Jack_Jones

ASKER

So there is no way to do this?
Avatar of Jack_Jones
Jack_Jones

ASKER

Thanks
Visual Basic.NET
Visual Basic.NET

Visual Basic .NET (VB.NET) is an object-oriented programming language implemented on the .NET framework, but also supported on other platforms such as Mono and Silverlight. Microsoft launched VB.NET as the successor to the Visual Basic language. Though it is similar in syntax to Visual Basic pre-2002, it is not the same technology,

96K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo