Monday, October 4, 2010

find control in Gridview Row DataBound

#region GridViewUser_RowDataBound

protected void GridViewUser_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
try
{
((ImageButton)e.Row.FindControl("imgEdit")).CommandArgument = e.Row.RowIndex.ToString();


}
catch { }
}
}

#endregion

No comments:

Post a Comment