DataGridView not showing Columns/Data

前端 未结 1 1789
迷失自我
迷失自我 2021-01-15 17:34

I\'m trying to load some data into a DataGridView, but either the DataGridView is not showing the data (even though it says in Debug-Mode that it has the items in it)

<
相关标签:
1条回答
  • 2021-01-15 17:49
    dataGridView1.DataSource = ds;
    dataGridView1.DataMember = ds.Tables[0].TableName;
    //or if you want to use DataTable as DataSource for your grid
    dataGridView1.DataSource = ds.Tables[0];
    
    0 讨论(0)
提交回复
热议问题