Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
How to bind AllowEdit to objekt property?
posted

Hello

How Fieldsettings.AllowEdit  can bind to my object property ?

I try this with code behind:

Dim bndReadonly As New System.Windows.Data.Binding
bndReadonly.Source = Ent
bndReadonly.Path = New System.Windows.PropertyPath("IsEditable")
Grid.SetBinding(Infragistics.Windows.DataPresenter.FieldSettings.AllowEditProperty, bndReadonly)

But it does not work.

Can you tell me why this does not work? my object raises the INotifyPropertyChanged correctly.

 

Thank you.

  • 54937
    Verified Answer
    Offline posted

    You can do this but you have to set the Binding on the FieldSettings instance since that is what has the AllowEditing property - not the xamDataGrid. So it would be something like: BindingOperations.SetBinding(Grid.FieldSettings, Infragistics.Windows.DataPresenter.FieldSettings.AllowEditProperty, bndReadonly)