Get Column Header in TableCellCollection in asp.net
I am using a website and i have a gridview in that website.... I want to delete a row in that gridview by using that selected row column values and Column headers... i got the column va开发者_JS百科lues by using TablecellCollection but i cant get that column value's Corresponding Column header.... how shall i get that Column header by using TableCellCollection....
Please anyOne Tell me the solution of this....
Thanks in Advance!
And My code is:
int Row = Convert.ToInt16(e.RowIndex);
TableCellCollection collection = GrdViewDetails.Rows[Row].Cells;
for (int i = 0; i < Collection.Cells.Count;i++)
{
strColumnValue = Collection.Cells[i].Text;
//strColumnName=?
}
GrdViewDetails.Columns[i].HeaderText
精彩评论