【发布时间】:2012-08-16 11:47:25
【问题描述】:
点击一个按钮,我将数据加载到我的数据网格中
MySqlCommand cmd1m = new MySqlCommand("select * from table", conn);
DataTable dt1m = new DataTable();
dt1m.Load(cmd1m.ExecuteReader());
System.Windows.Forms.BindingSource source = new System.Windows.Forms.BindingSource();
source.DataSource = dt1m;
dataGrid1.ItemsSource = source;
命名空间:
xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit/extended"
和 xaml:
<wpf:BusyIndicator Name="loading" IsBusy="False">
<DataGrid>...</DataGrid>
</<wpf:BusyIndicator>
但指标不工作,为什么?我应该怎么做才能让它发挥作用?
【问题讨论】:
-
嗨,欢迎来到 SO!考虑使用比“不工作”更贴切的描述。什么不工作?它怎么不工作?你期待什么?