GridView take a Row
- by GIbboK
Hi I use asp.net 4 and c#.
I have a GridView, I would like take a Row when in Edit Mode in my code and find a control.
Here my code, but does not work, it takes only the first row for the GridView.
Any ideas?
protected void uxManageSlotsDisplayer_RowDataBound(object sender, GridViewRowEventArgs e)
{
switch (e.Row.RowType)
{
case DataControlRowType.DataRow:
// Take Row in Edit Mode DOES NOT WORK PROEPRLY
if (e.RowState == DataControlRowState.Edit)
{
Label myTest = (Label)e.Row.FindControl("uxTest");
}
break;
}