读书人

如何让DATASET数据在DATAGRIDVIEW中显

发布时间: 2012-04-24 14:15:38 作者: rapoo

怎么让DATASET数据在DATAGRIDVIEW中显示?

C# code
 SqlConnection thisConnection = new SqlConnection(               @"Server=CVRE1WTZRSTAGNW\SQLSERVER2008;Integrated Security=True;" +           @"Database=northwind");            DataSet thisDataSet = new DataSet();            SqlDataAdapter custAdapter = new SqlDataAdapter(                "SELECT * FROM Customers", thisConnection);            custAdapter.Fill(thisDataSet, "Customers");            dataGridView1.DataSource = ...


请问该怎么写?
谢谢。

[解决办法]
d我记得好像是 DataGridView1.DataSource = thisDataSet.DataTable[0];
[解决办法]
dataGridView1.DataSource = thisDataSet.DataTable[0];

读书人网 >C#

热点推荐