0
我想綁定一個MySQL數據庫到我的WPF GridView。 但這不起作用。我想這樣做:WPF DataGrid Databindung到MySql
MySqlDataAdapter adapter = new MySqlDataAdapter(query, connection);
MySqlCommandBuilder builder = new MySqlCommandBuilder(adapter);
DataTable table = new DataTable();
adapter.Fill(table);
BindingSource source = new BindingSource();
source.DataSource = table;
areaDataGrid.DataContext = table;
但gid是空的。爲什麼?