Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Unassigned: All checkboxes in CheckComboBox become disabled in 2.7.0 [22261]

$
0
0
After release 2.7.0 all checkboxes in CheckComboBox become permanently disabled. When we rolled the nugget packages back to 2.6.0, everything worked again.
Comments: ** Comment from web user: Galead **

Hi, I've solved this issue.

We have inherited class that sets Text property based on selected items count.
I've added empty OnTextChanged() override to fix disabled checkboxes issue.
It seems that since v2.7 CheckComboBox wants to parse Text property on each property update and to set checkboxes accordingly, but this fails in case of custom text.

public class CountingCheckComboBox: CheckComboBox
{
public CountingCheckComboBox()
{
this.UpdateText();
}

// Added this method to fix the issue //
protected override void OnTextChanged(string oldValue, string newValue)
{
}
//////////////////////////////////////////

protected override void OnSelectedValueChanged(string oldValue, string newValue)
{
this.UpdateText();
}

private void UpdateText()
{
this.Text = string.Format("Items selected: {0}", this.SelectedItems.Count);
}
}


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>