Show photos inside the datagridview cells

  • Thread starter Thread starter ahmeddc
  • Start date Start date
A

ahmeddc

Guest
hi

I want to show pictures inside the datagridview cells.
I used the following code, but it looks like this.

1608241.png

What I specifically want


1608242.jpg

my code


DataTable dtb = new DataTable();

SqlCommand cmde = new SqlCommand("select_data", con);
cmde.CommandType = CommandType.StoredProcedure;

con.Open();
cmde.ExecuteNonQuery();
SqlDataAdapter dae = new SqlDataAdapter(cmde);
dtb.Clear();
dae.Fill(dtb);
con.Close();
if (dtb.Rows.Count > 0)
{
dataGridView1.DataSource = dtb;


}

else
{

MessageBox.Show("error2 ");
}

Continue reading...
 
Back
Top