Hey,
Is it possible to data bind to xamDataGrid.FieldSettings.AllowEdit? I have a view model with a boolean that I want to bind to this property but the binding isn't working at run time. I tried to set up the binding in code (after trying to set it up in xaml didn't work) but FieldSettings doesn't have a SetBinding method, so I'm wondering if binding to a FieldSettings' properties isn't supported?
Edit:
I was able to get this working using the DataContextSpy approach described here: http://www.codeproject.com/KB/WPF/ArtificialInheritanceCxt.aspx
Thanks
Hi,
Definitely, it's possible. Look at for example http://forums.infragistics.com/forums/t/10907.aspx .In some situations, however you should use another approach http://forums.infragistics.com/forums/t/8890.aspx .
Best Regards,Yanko
It's not possible, I did so:
DataPresenterTelefoni.SetBinding(Infragistics.Windows.DataPresenter.FieldSettings.AllowEditProperty, new Binding("IsModifyState") { Source = obAnagDett });
but doesn't work, so databinding it's not possible.
private void obAnagDett_IsModifyStateChanged(object sender, DependencyPropertyChangedEventArgs e){ OperationButtons ob = sender as OperationButtons; fsAllBanca.AllowEdit = ob.IsModifyState;}
I created a DependencyPropertyChangedEvent of my DependencyProperty and when it changes I change the AllowEdit value :-)