MySqlCommand cmd = new MySqlCommand(query, conn);
dt.Load(cmd.ExecuteReader());
List<string> list = new List<string>();
while (combodata.Read())
{
list.Add(combodata.GetString(0));
}
source.DataSource = dt;
dataGrid1.ItemsSource = source;
如何將list
添加到source
?多項ItemsSource(wpf)
source.DataSource = dt;
source.DataSource = list;
錯了...
我需要添加一個dataGrid1.ItemsSource
和dt
list
我怎麼能?
是什麼'source'的類型? – 2012-07-11 12:15:38
'System.Windows.Forms.BindingSource source = new System.Windows.Forms.BindingSource();' – kekus 2012-07-11 12:21:57