1
Answer

How to display image while retrieve data from database?

Ask a question
Ankit Agarwal

Ankit Agarwal

11y
1.1k
1
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)