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 8104629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T23:54:19+00:00 2026-06-05T23:54:19+00:00

I am trying to import a logfile and display it in a listview in

  • 0

I am trying to import a logfile and display it in a listview in a grid format ( much like excel ). I am wondering what may be the best approach to take with this. Filereader and a data table possibly ? I have not programmed anything like this before. This is a windows form project.

Any advice on the issue would be a great help.

EDIT2:

Example of the logfile:

 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
 i d   =   1 0 0 1
 P a r a m e t e r   1   =   E N A B L E D
 P a r a m e t e r   2   =   D I S A B L E D
 P a r a m e t e r   3   =   N U L L
 P a r a m e t e r   4   =   N U L L
 P a r a m e t e r   5   =   S U C C E S S  
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 

This the repeats with different Data.

I would like this to be read in and displayed in a listview under the different headings id, name etc

This application is limited to the use of .NET 3.5 also.

  • 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-06-05T23:54:21+00:00Added an answer on June 5, 2026 at 11:54 pm

    My best guess would be to read your file in one line at a time using a StreamReader and placing the data in a DataGridView.

    Edit: The following code works for me on a project targeted to .Net 2.0 and assumes the name of your DataGridView is dataGridView1

    StreamReader reader = new StreamReader(@"C:\Users\jdudley\file.txt");
    // Will be incremented every time ID shows up so it must started at -1 so we don't
    // try and start inserting at 1.
    int rowIndex = -1;
    while (!reader.EndOfStream)
    {
        string line = reader.ReadLine();
        string[] parsedLine = line.Split(new char[] { '=' });
        if(!this.dataGridView1.Columns.Contains(parsedLine[0]))
        {
            dataGridView1.Columns.Add(parsedLine[0],parsedLine[0]);
        }
        if (parsedLine[0].Trim().Equals("id"))
        {
            rowIndex++;
            dataGridView1.Rows.Add();
        }
        dataGridView1[parsedLine[0], rowIndex].Value = parsedLine[1];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to import html table data to an excel file and have succeeded
I'm trying to import, and my statement looks like this: import C.Users.pro-services.Documents.JAVA.libs.feed.synd.SyndFeed; The compiler
I am trying to import the MoPub sdk into eclipse, but I am getting
I'm trying to import an XML file that contains a list of points for
I am trying this import java.io.BufferedOutputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream;
I'm currently trying to import about 10000 rows (from a CSV file) into an
I'm trying to import our SVN repository into Git. When I run either this
I am trying to import cloudera's org.apache.hadoop:hadoop-client:2.0.0-cdh4.0.0 from cdh4 maven repo in a maven
I am trying to import wordpress content into liferay 6.1 using the wordpress importer
I am trying to import a large array of integers stored as a csv

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.