本帖最后由 guoguo 于 2014-3-13 20:16 编辑
<DataGridTextColumn Header="姓名" Binding="{Binding Name}" Width="100"></DataGridTextColumn>
<DataGridTextColumn Header="生日" Width="100" Binding="{Binding Birthday}"></DataGridTextColumn>
<DataGridTextColumn Header="地址" Width="150" Binding="{Binding Address}"></DataGridTextColumn>
<DataGridTextColumn Header="电话" Width="100" Binding="{Binding TelNumber}"></DataGridTextColumn>
<DataGridTextColumn Header="等级" Width="50" Binding="{Binding CustLevel}"></DataGridTextColumn>
</DataGrid.Columns>
在window_OnLoad事件中,getAll()方法返回了一个列表,调试时也确实有数据,但就是显示一片空白,怎么会是呢,请教高手指点一下!!
private void Window_Loaded(object sender, RoutedEventArgs e) {
gridClients.ItemsSource = ClientDAL.GetAll(); }
|