【发布时间】:2012-05-27 07:20:40
【问题描述】:
我有财产UserSet,其中包含来自ObservableCollection<GridRow>。
GridRow - 我的类,它包含 4 个这样的属性:
public int Id
{
get { return id; }
set
{
id = value;
RaisePropertyChanged("Id");
}
}
我填充 UserSet,然后 Grid 绑定到它。当我更改id 现场工作设置器Id。它设定了正确的价值观。
但是,在所有更改之后,当我单击其他按钮时,我的 UserSet 没有修改值。所以我无法获得更新的网格。
这是我的 XAML:
<DataGrid ItemsSource="{Binding UsersSet, Mode=TwoWay}" AutoGenerateColumns="True">
</DataGrid>
请帮忙。
【问题讨论】:
标签: wpf xaml data-binding