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