VS2010 - WinForms - DataGridView - Binding to DataSet

后端 未结 4 1050
旧巷少年郎
旧巷少年郎 2021-01-13 05:56

I am new to winforms and I have a datagridview inside a table control. I am trying to bind it to display data.

DataSet dataSet = new DataSet();
DataTable dat         


        
4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-13 06:40

    you only have to add this:

    dataGridView1.DataMember = ds.Tables(0).ToString()

提交回复
热议问题