if you want to add style on Grid Rows in asp.net using c# just copy and past the below code in your .cs file.
Click herefor More Solutions
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[1].Style.Add(HtmlTextWriterStyle.Position, "relative");
e.Row.Cells[1].Style.Add(HtmlTextWriterStyle.Overflow, "auto");
e.Row.Cells[1].Style.Add(HtmlTextWriterStyle.BackgroundColor, "White");
}
}
Click herefor More Solutions
Tags:
asp.net