You Can : (its works for me)
1. add a byte column to table of dataset
2. Add image in byte column
3. then bind data table with grid
as follows
private void BindGrid()
{
DataSet ds = objStaff.GetStaff(1);
if (ds != null)
{
DataTable dtable = new DataTable();
DataColumn dcol = new DataColumn("myImage");
dtable = ds.Tables[0].Copy;
dcol.AllowDBNull = true;
dcol.DataType = System.Type.GetType("System.Byte[]");
dcol.Caption = "myImage";
dtable.Columns.Add(dcol);
foreach (DataRow drow in dtable.Rows)
{
string imagePath = drow[1].ToString();
Image image = Image.FromFile(imagePath);
System.IO.MemoryStream ms = new System.IO.MemoryStream();
image.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
drow["myImage"] = ms.ToArray();
}
grdDetail.DataSource = dtable;
grdDetail.Columns["StaffId"].Visible = false;
grdDetail.Columns["Image"].Visible = false;
}
}