CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 2001
    Posts
    155

    Open txt file into MSFlexgrid

    How do you open a text file into an MSFlexgrid?
    The code i thought would work doesn't work
    i would really appreaciate a working example

    --Ant
    --------------------------------------------------
    check out my newest freeware
    E-mail me at: [email protected]
    for the address

  2. #2
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Open txt file into MSFlexgrid

    What do you mean by opening text file to the msfg. If you think about CSV file then you can create the recordset from it and then load rs to msfg.

    Iouri Boutchkine
    [email protected]
    Iouri Boutchkine
    [email protected]

  3. #3
    Join Date
    Jun 2001
    Location
    Memphis, TN
    Posts
    146

    Re: Open txt file into MSFlexgrid

    If that text file is saved so that columns are tabbed out and there are carriage returns for each row, just use Line Input to read in a line at a time, then set the current row in the flexgrid to the string Line Input returns. The tabs in the string will tab between fields in the flexgrid. You'll probably need to configure the number of columns in the grid before inserting any data so either do it at design time if you know your grids are always going to have the same number of columns, or do it at run time based on how many columns there are in the text file.


  4. #4
    Join Date
    May 2001
    Posts
    155

    Re: Open txt file into MSFlexgrid

    how do you do that?

    --Ant
    --------------------------------------------------
    check out my newest freeware
    E-mail me at: [email protected]
    for the address

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured