I'm trying to assign a css class to gridview row, but it does nothing. Code:
ImageButton button = (ImageButton)sender;
GridViewRow gvr = (GridViewRow)button.NamingContainer;
gvr.Attributes["class"] = "animated fadeOutRight";
What's wrong?
I'm trying to assign a css class to gridview row, but it does nothing. Code:
ImageButton button = (ImageButton)sender;
GridViewRow gvr = (GridViewRow)button.NamingContainer;
gvr.Attributes["class"] = "animated fadeOutRight";
What's wrong?
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.CssClass = "animated fadeOutRight";
}
}
Css must be applied in RowDataBound only