Last Updated: 02 Oct 2015 13:46 by Alexander
Created on: 17 Sep 2015 15:26
Category: UI for WPF
Type: Bug Report
CloneBinding should return null if source is null and source's BindingMode should be kept
When the UI culture changes, the DataMemberBinding is updated for all columns (I'm wondering why?). See \Controls\GridView\GridView\GridView\GridViewDataControl.cs:

private void UpdateCultureInfoIfNeeded()
	if (this.cultureInfo != null && (this.cultureInfo.Name.ToUpper(this.cultureInfo) != this.Language.IetfLanguageTag.ToUpper(this.cultureInfo)))
		foreach (var column in this.Columns.OfType<GridViewBoundColumnBase>())
			Binding oldBinding = column.DataMemberBinding.CloneBinding(column.ValidatesOnDataErrors);
			column.DataMemberBinding = oldBinding;

However, if the DataMemberBinding was null, the CloneBinding creates a new binding with empty path instead of returning null again - but this never makes sense for the DataMemberBinding on a column (crashes the application as soon as the Binding is applied to the cells).

Background: I have created a column where the cell value is not bound but dynamically calculated - so the DataMemberBinding is null.
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)