My brain is fried. How can I determine if the row is in edit mode when
processing the RowDataBound event? Thanks.
David
> My brain is fried. How can I determine if the row is in edit mode when
> processing the RowDataBound event? Thanks.
>
> David
Try checking the EditIndex property on your GridView.
protected void GridView1_RowDataBound(object sender,
GridViewRowEventArgs e)
{
if (this.GridView1.EditIndex == -1)
{
//not in edit mode...
}
else
{
//in edit mode
}
}
David C - 05 Dec 2007 17:42 GMT
Thank you both. I'll keep this somewhere so I can refer to it the next time
my brain goes dead.
David
>> My brain is fried. How can I determine if the row is in edit mode when
>> processing the RowDataBound event? Thanks.
[quoted text clipped - 15 lines]
> }
> }
> My brain is fried. How can I determine if the row is in edit mode when
> processing the RowDataBound event? Thanks.
>
> David
if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowState ==
DataControlRowState.Edit)
{
...
}
Regards
Mykola
http://marss.co.ua