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
?
source.DataSource = dt;
source.DataSource = list;
错误的...
我需要添加dataGrid1.ItemsSource
一个dt
,list
我该怎么做?