How can I make a Save/Open buttons that will save and open ListView items AND THEIR DETAILS? (tried anything and it won't save anything else but the name)
DyO1
Recommended Answers
Jump to PostEach item in the ListView.Items collection has a SubItems collection. The data associated with the Item itself, is actually in SubItem(0). Therefore by iterating through all the SubItems from 0 to SubItems.Count - 1 you can save all the data from the Item.
Alternatively if you use a DataTable to …
Jump to PostWhat in particular didn't you understand? I discussed 2 different concepts.
What code have you tried? It's a lot easier for you to understand if I show you, your code, modified, than if I just give you generic code.
Jump to PostTry adding
Imports System.LINQ
to the top of the file.Just in case your version of Visual Studio is too old to have LINQ, older than Framework 3.5, here is the long version without LINQ that does the same thing:
Dim sw As New IO.StreamWriter("textfile2.csv") …
Jump to PostThere's 2 operations you have to reverse when loading the data. Not only do you have to change the Write to Read, you have to change the Join to Split. Plus adding items is much simpler :
Try ListView1.Items.Clear() Dim sr As New IO.StreamReader(Path) While Not …
All 13 Replies
tinstaafl
1,176
Posting Maven
DyO1
tinstaafl
1,176
Posting Maven
DyO1
tinstaafl
1,176
Posting Maven
DyO1
DyO1
tinstaafl
1,176
Posting Maven
DyO1
tinstaafl
1,176
Posting Maven
DyO1
commented:
Thanks, worked !
+1
DyO1
DyO1
tinstaafl
1,176
Posting Maven
DyO1
commented:
Thanks mate, everything is running good :-D best user I've found on this site yet :-)
+0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.