Hi all,
This is Varun Tiwari here. Actually ,using the textfiletogrid dll is so much easy and by writting 5-6 lines of code,you can bind your text file to grid view.
Here i am showing you that how to implement the methods written in it.

private void button1_Click(object sender, EventArgs e)
List<DataColumn> column=null;
TextToGrid t = new TextToGrid(your file name with full path(string type) , your text file delimiter(char type) );
column= t.CreateColumns(name of all columns separated by comma(string type));
DataTable dt= t.CreateTable(column);
DataSet ds = t.CreateDataSource(dt);
dataGridView1.DataSource = ds.Tables[0];


Last edited Jun 25, 2011 at 10:24 AM by thevaruntiwari, version 2


No comments yet.