Click here to Skip to main content
15,030,954 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: (untagged)
in my simple project have store image to database.insertion of image is successful....then retrieve the image from data base to grid view is success but in data grid view image column only show cross mark...not showing images in a fields.
Posted
Comments
Member 10984793 25-Aug-14 5:20am
   
pls help...
ChauhanAjay 25-Aug-14 5:27am
   
Check this link may be it help
http://www.c-sharpcorner.com/Forums/Thread/239472/how-can-we-image-display-in-data-gridview-column-in-C-Sharp-net.aspx
   
Please post relevant codes only.
Member 10984793 26-Aug-14 0:00am
   
// code for gridview data from the data base.but not show image data,only cross mark showing.
private void btn_load_Click_1(object sender, EventArgs e)
{
try
{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Users\Keltron_Project\Documents\imgdb.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
con.Open();
SqlDataAdapter da = new SqlDataAdapter("select * from imgstore ", con);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
//dataGridView1.AutoGenerateColumns = false;
// if (ds.Tables[0].Rows.Count > 0)
// {
dataGridView1.DataSource = ds.Tables[0];
dataGridView1.AutoGenerateColumns = false;
// }
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}


}
Member 10984793 26-Aug-14 2:01am
   
pls hlp
Member 10984793 30-Aug-14 1:00am
   
pls help me......
Member 10984793 30-Aug-14 1:08am
   
the button load click then a popup window show and it says" please handle the data error event".
how to handle data error event....
Member 10984793 3-Sep-14 6:26am
   
please help....sir
Member 10984793 19-Sep-14 2:52am
   
anybody help me sir...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900