i was just making a mistak that in FindControl, i was using column "Data" instead of ID ("img") .
protected void gvDepartments_RowDataBound(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
DataRowView dr = (DataRowView)e.Row.DataItem;
string imageUrl = "data:image/jpg;base64," + Convert.ToBase64String((byte[])dr["Data"]);
(e.Row.FindControl("img") as System.Web.UI.WebControls.Image).ImageUrl = imageUrl;
}
}
catch (Exception ex)
{ }
}