|
|
|
@ -49,8 +49,13 @@ namespace Avalonia.Controls |
|
|
|
{ |
|
|
|
if(_binding is Avalonia.Data.Binding binding) |
|
|
|
{ |
|
|
|
if (binding.Mode == BindingMode.OneWayToSource) |
|
|
|
{ |
|
|
|
throw new InvalidOperationException("DataGridColumn doesn't support BindingMode.OneWayToSource"); |
|
|
|
} |
|
|
|
|
|
|
|
// Force the TwoWay binding mode if there is a Path present. TwoWay binding requires a Path.
|
|
|
|
if (!String.IsNullOrEmpty(binding.Path)) |
|
|
|
if (!String.IsNullOrEmpty(binding.Path) && binding.Mode == BindingMode.Default) |
|
|
|
{ |
|
|
|
binding.Mode = BindingMode.TwoWay; |
|
|
|
} |
|
|
|
|