-
April 18th, 2014, 10:34 AM
#1
Load CSV to Listview including Subitems
Hello all!
Using Visual Basic 2008, I Want to load a csv file to Listview.
I am new to LINQ, and had some great performance increase in using LINQ (compared to loops) when loading a csv file to a single column Listview.
Example Code:
Code:
Dim items() As ListViewItem = (From line In IO.File.ReadAllLines(thefiletoread) Where line.Length <> 0 Select New ListViewItem(RTrim(line.ToUpper))).ToArray
ListView2.Items.AddRange(items)
altought, i have not found any way to do the exact same thing, but in a multiple column Listview.
I do not wish to use loops, since LINQ syntax works so well.
any of you guys have an idea?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|