|
-
May 31st, 2009, 07:24 PM
#1
Thread Starter
Hyperactive Member
DataGridView Bind to Text File
Is it possible to bind a DataGridView to a text file?
-
May 31st, 2009, 07:45 PM
#2
Re: DataGridView Bind to Text File
Yes and no. It's certainly not possible to actually bind the grid to the file itself. You would need to read the file into some data structure that implements the IList interface, which is required for data-binding. You might use ADO.NET to read the file contents into a DataTable and bind that, or you might use a TextFieldParser to read the file into objects of your own and put those in an array or collection and then bind that.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|