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

  • SEARCH
  • Home
  • 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 a text based browser game, so how should I go
I wanted to create an HTML page which would have a set search criterias.
i wanted to create a topic model. this model would have a foreign key,
I wanted to create an XML File from Resouce File(.resx). I succeeded in that
I wanted to create a control with a TextBox and to bind TextBox.Text property
I wanted to create a page with a simple button which runs away from
I wanted to create one js file which includes every js files to attach
I wanted to create a makefile. So I wrote instructions in a notepad file.
I wanted to create a function which would return the path of the current
I wanted to create an extension of java.text.Format but I do not know what

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.