I've a gridview in my web form and I'm using a the following code in my web form's Save button:
foreach (GridViewRow row in gvList.Rows)
if (row.RowType == DataControlRowType.DataRow)
{ for (int i = 0; i < row.Cells.Count; i++)
{
string headerRowText = ???;
How can I get the current cell's header text.
I solved it using:
string headerRowText = gvList.HeaderRow.Cells[i].Text;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With