Populate a datagridview with sql query results

前端 未结 9 1124
旧巷少年郎
旧巷少年郎 2020-12-02 23:02

I\'m trying to present query results, but I keep getting a blank data grid. It\'s like the data itself is not visible

Here is my code:

 private void         


        
9条回答
  •  感情败类
    2020-12-02 23:39

    you have to add the property Tables to the DataGridView Data Source

     dataGridView1.DataSource = table.Tables[0];
    

提交回复
热议问题