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;