Silverlight 4.0 Silverlight datagrid不绑定
嘿,格斯,我有纽扣:Silverlight 4.0 Silverlight datagrid不绑定,silverlight-4.0,datagrid,observablecollection,Silverlight 4.0,Datagrid,Observablecollection,嘿,格斯,我有纽扣: GetData(); dataGrid1.ItemsSource = DriverCollection.ToList(); 当我点击它时,datagrid不填充,只添加了两行(我的集合包含两行),这是空的,非常窄 这是我的课 private class DriverData { public string DriverName { get; set; } public decim
GetData();
dataGrid1.ItemsSource = DriverCollection.ToList();
当我点击它时,datagrid不填充,只添加了两行(我的集合包含两行),这是空的,非常窄
这是我的课
private class DriverData
{
public string DriverName { get; set; }
public decimal DriverSalary { get; set; }
}
收藏:
private ObservableCollection<DriverData> _DriverCollection = new ObservableCollection<DriverData>();
private ObservableCollection<DriverData> DriverCollection
{
get { return _DriverCollection; }
}
private observedcollection\u DriverCollection=new observedcollection();
专用可观察采集驱动器采集
{
获取{return\u DriverCollection;}
}
GetData方法好的,到目前为止你做得很好 您可以更改DriverCollection并将其公开吗。i、 e
public ObservableCollection<DriverData> DriverCollection
{
get { return _DriverCollection; }
}
公共可见采集驱动采集
{
获取{return\u DriverCollection;}
}
好的,到目前为止你做得很好
您可以更改DriverCollection并将其公开吗。i、 e
public ObservableCollection<DriverData> DriverCollection
{
get { return _DriverCollection; }
}
公共可见采集驱动采集
{
获取{return\u DriverCollection;}
}
public ObservableCollection<DriverData> DriverCollection
{
get { return _DriverCollection; }
}