2
如何組合框綁定到數據集在後面的代碼,而不使用XAML可言:綁定組合框的DataSet在後面的代碼(不XAML)
我嘗試以下,但我所有的組合框項目是「系統。 Data.DataRowView「而不是實際值。哪裏不對?
string str = @"SELECT * FROM FooTable";
da.SelectCommand = new SqlCeCommand(str, connection);
da.Fill(devDs, "FooTable");
dt = ds.Tables["FooTable"];
comboBox1.ItemsSource = devDt.DefaultView;