D David C Dec 4, 2007 #1 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
D Dan Gartner Dec 5, 2007 #2 My brain is fried. How can I determine if the row is in edit mode when processing the RowDataBound event? Thanks. David Click to expand... 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 } }
My brain is fried. How can I determine if the row is in edit mode when processing the RowDataBound event? Thanks. David Click to expand... 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 } }
M marss Dec 5, 2007 #3 My brain is fried. How can I determine if the row is in edit mode when processing the RowDataBound event? Thanks. David Click to expand... if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowState == DataControlRowState.Edit) { ... } Regards Mykola http://marss.co.ua
My brain is fried. How can I determine if the row is in edit mode when processing the RowDataBound event? Thanks. David Click to expand... if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowState == DataControlRowState.Edit) { ... } Regards Mykola http://marss.co.ua
D David C Dec 5, 2007 #4 Thank you both. I'll keep this somewhere so I can refer to it the next time my brain goes dead. David
Thank you both. I'll keep this somewhere so I can refer to it the next time my brain goes dead. David