Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 698349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:15:54+00:00 2026-05-14T03:15:54+00:00

What I wanted to do was create a listbox from a delimited text file.

  • 0

What I wanted to do was create a listbox from a delimited text file.

The listbox would populate X # of rows based on the rows of the text file. And the listbox would have 3 columns, each being populated from a specific delimiter. Is this possible in C#? Any starting point would be great!


Hmm, i need to work on my explaination skills. What i’m wondering is if its possible to make a listbox with column and row lines in it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:15:54+00:00Added an answer on May 14, 2026 at 3:15 am

    I suggest you using ListView (also set details view, and add header with three columns).

    private void addLineToListView(String col1Text, String col2Text, String col3Text)
        {
            ListViewItem lvItem;
            if ((lvItem = this.listView1.Items.Add(col1Text)) != null)
            {
                lvItem.SubItems.Add(col2Text);
                lvItem.SubItems.Add(col3Text);
            }
        }
    

    for loading file it’s simple as well:

      private void AggregateTextFileIntoListView(String pathToFile)
      {
          using (TextReader tr = new StreamReader(pathToFile)))
                {
                    String line;
                    while ((line = tr.ReadLine()) != null)
                    {
                        //* let's delimiter be ";".
                        String[] lineParts = line.Split(';');
                        addLineToListView(lineParts[0], lineParts[1], lineParts[2]);
                    }
    
                    tr.Close();
                }
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to create an HTML page which would have a set search criterias.
In ASP C#, you can create a select (ListBox) then populate it with items
I wanted to create a file which has all the KeyPairs I need to
I wanted to create my own Python exception class, like this: class MyException(BaseException): def
Let's say I woke up today and wanted to create a clone of StackOverflow.com,
i wanted to create a tagging system, so i want to know how can
I wanted to create a little macro to simulate for(auto item : container) in
I wanted to create an IDN-aware formencode validator to use in one of my
hello i wanted to create a format for users url, for example for the
If I wanted to create a commercial web-project (like e.g. facebook) with a Java

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.