GridView take a Row
Posted
by
GIbboK
on Stack Overflow
See other posts from Stack Overflow
or by GIbboK
Published on 2011-03-02T15:17:22Z
Indexed on
2011/03/02
15:24 UTC
Read the original article
Hit count: 276
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;
}
© Stack Overflow or respective owner