VS2010 - WinForms - DataGridView - Binding to DataSet

后端 未结 4 996
旧巷少年郎
旧巷少年郎 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:39

    Setting DataSource property will bind datasouce. ASP.NET needs a .DataBind call instead.

    For the checkbox you need to add a column of type DataGridViewCheckBoxColumn.

    Best resource i found on databind (these are for framework 2.0/VS2005):

    • http://windowsclient.net/Samples/Go%20To%20Market/Data%20Binding/DataBinding%20FAQ.doc

    • http://windowsclient.net/Samples/Go%20To%20Market/DataGridView/DataGridView%20FAQ.doc

提交回复
热议问题