Ankit Agarwal

Ankit Agarwal

  • NA
  • 379
  • 253.4k

How to display image while retrieve data from database?

Sep 9 2013 5:12 AM
Hello,

I am using this code for display image while retrieve data from database to datagridview in C# .net windows application.:-

    pictureBox1.Visible = true; // it's a swf loading image.
            dataGridView1.ReadOnly = true;
            SqlConnection con = new SqlConnection(cnString1);
            con.Open();
            dadapter = new SqlDataAdapter("select * from BAN_ItemDataMaster where [Signal Code]='HOME'", con);
            data = new DataTable();
            dadapter.Fill(data);
            dataGridView1.DataSource = data;
            con.Close();
pictureBox1.Visible = false;

but my code it's not properly run.
my image did not display.

I want to display image while database load.

Please help me, How could be possible?

Thanks in advance.

Ankit Agarwal
Software Engineer


Answers (1)