Infragistics XamDataGrid AllowEdit 属性绑定不起作用
在我的 XAML 中,我尝试将 XamDataGrid 的 AllowEdit 绑定到属性,
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings AllowEdit="{Binding Path=DataItem.Approved}"/>
</igDP:XamDataGrid.FieldSettings>
但它不起作用。所有其他绑定都工作正常。有什么想法吗?我是 WPF 新手,因此我们将不胜感激
In my XAML I'm trying to bind AllowEdit of my XamDataGrid to a property
<igDP:XamDataGrid.FieldSettings>
<igDP:FieldSettings AllowEdit="{Binding Path=DataItem.Approved}"/>
</igDP:XamDataGrid.FieldSettings>
But it doesn't work. All other bindings work fine. Any ideas? I'm new to WPF so any help would be appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我使用一种样式来解决这个限制,例如:
I use a style to get around this limitation, e.g.:
我通常使用一种风格来实现这一点,如上面 @larsmona 的回答所示。最近我了解了如何使用 CellBindings 和 FieldBindings 来实现此目的。
https://www.infragistics.com/community/blogs/b/blagunas/posts/feature-spotlight-new-fetaures-in-the-infragistics-wpf-xamdatagrid
https://www.infragistics.com/help/wpf/xamdatagrid-binding-cell-settings-data-item-properties
http://help.infragistics.com/Help/Doc/WPF/2014.2/CLR4.0/html/xamDataPresenter_Binding_Cell_Settings_Data_Item_Properties.html
I usually used a style to achieve this as in @larsmona's answer above. Recently I learned about using CellBindings and FieldBindings to achieve this.
https://www.infragistics.com/community/blogs/b/blagunas/posts/feature-spotlight-new-fetaures-in-the-infragistics-wpf-xamdatagrid
https://www.infragistics.com/help/wpf/xamdatagrid-binding-cell-settings-data-item-properties
http://help.infragistics.com/Help/Doc/WPF/2014.2/CLR4.0/html/xamDataPresenter_Binding_Cell_Settings_Data_Item_Properties.html
显然你(仍然......)无法绑定此属性: http:// www.infragistics.com/community/forums/t/10907.aspx
叹...
Apparently you (still.....) cannot bind this property: http://www.infragistics.com/community/forums/t/10907.aspx
sigh...
也许您正在绑定到
ObservableCollection
?如果是这种情况,您将无法编辑您的项目。您可以尝试绑定到BindingList
。Perhaps you're binding to
ObservableCollection
? If that's the case, you can't edit your items. You can try bind toBindingList
instead.