Is it possible to bind a DataGridView to a text file?
Printable View
Is it possible to bind a DataGridView to a 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.