fiveforty Posted April 11, 2003 Posted April 11, 2003 i'm a beginner vb.net programmer and would like some assistance with loading a txt file into some sort of a list. What i have is: a text file with some sort of delimiting method, eg. firstname|lastname|age|etc... or firstname:lastname:age:etc.. and i want to load this into some sort of a list with a column for each field, so: ______________________________ | first name | last name | age | etc... ------------------------------------------ nick thomas 34 john doe 23 etc i currently have FileOpen and LineInput to read the file, but cannot get the fields into the columns in a ListView (i can parse it but don't know how to specify items.add to different columns). Also how can i take the value of individual columns in a selected row and put them into TextBox 'es like First Name: Last name, etc? sorry if this problem has been addressed before. any help would be greatly appreciated. -michael Quote
Moderators Robby Posted April 11, 2003 Moderators Posted April 11, 2003 I posted a sample here, http://www.xtremedotnettalk.com/showthread.php?s=&threadid=70864 I don't remember what's in it, but it does deal with a ListView so it may help. Quote Visit...Bassic Software
Heiko Posted April 11, 2003 Posted April 11, 2003 Write a routine that reads one line of text. And then implement the following pseudocode. Dim myLine as string Dim myItems() as string 'array open file Do While Not file.eof myLine = ReadLine myItems = split(myLine) ... Process Items Loop Quote .nerd
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.