I have a gridview which has 4 columns in total now the first column name i am importing from an excel sheet which is named as "FileName".the gridview is taking columnheader as F1 instead of filename.i need that f1 to be replaced with my column header name.
so far I have tried
dataGridView1.Columns[0].Name = "Filename";
dtExcel.Columns.Add("Filename");
dataGridView1.Columns[0].HeaderText = "Filename"
by this, all new column of the filename is getting added but that F1 is not getting replaced.
Help Please.