i have a bit value (Black) i want to display its status in gridview as if its true, the row display \"Yes\", otherwise the row display \"No\", this is my code, but the resul
Do you need to iterate through a DataTable dt on each RowDatabound ?
If you do not need this could you try:
protected void gridview1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Boolean bitBlack = Convert.ToBoolean(e.Row.Cells[7].Text);
if (bitBlack)
{
e.Row.Cells[7].Text = "Yes";
}
else
{
e.Row.Cells[7].Text = "No";
}
}
}