Results 1 to 2 of 2

Thread: [RESOLVED] Loading .txt file separated with comma to datagrid

  1. #1

    Thread Starter
    Hyperactive Member shyguyjeff's Avatar
    Join Date
    Jul 2007
    Location
    City of Durian
    Posts
    289

    Resolved [RESOLVED] Loading .txt file separated with comma to datagrid

    Hello everyone, i have here a .txt format wherein It show like this:

    Code:
    n,[email protected],"Sent successfully"
    neha,[email protected],"Sent successfully"
    kab,[email protected],"Sent successfully"
    mickey,[email protected],"Sent successfully"
    rahman,[email protected],"Sent successfully"
    addou,[email protected],"Sent successfully"
    kanaan,[email protected],"Sent successfully"
    pitlik,[email protected],"Sent successfully"
    What my problem is that, how can I load this .txt file to a datagrid and arrange it in a 3 columns. That .txt file is auto generated that's why i cannot do anything about the textfile. Thanks in advance everyone. God bless!

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Loading .txt file separated with comma to datagrid

    Hey,

    It is actually possible to use ADO.Net to connect to a CSV file. Using this approach it would be quite simple to show the data in a DataGrid:

    http://weblogs.asp.net/fmarguerie/ar.../01/29964.aspx

    Hope that helps!!

    Gary

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