How display images in datagridview? c#

前端 未结 3 653
情深已故
情深已故 2020-12-19 10:22

I am developing an application in C # for desktop using Visual Studio Express 2010.

I have a table in MySQL called Products with 3 fields:

ID

3条回答
  •  青春惊慌失措
    2020-12-19 10:52

    You can Doing this simple way

                SqlConnection conn=New   SqlConnection("SERVER=127.0.0.1;DATABASE=bdss;UID=sa;PASSWORD=1234");
                SqlDataAdapter adpt = new SqlDataAdapter("select * from products",conn);
                DataTable dt = new System.Data.DataTable();
                adpt.Fill(dt);
                int count = dt.Rows.Count;
    
                dataGridView1.DataSource = dt;
    

    thats All you can change Datagrid view height and with according your requirment

提交回复
热议问题