Hi experts,
When using xamMultiColumnComboEditor and filter on all columns. If I type for example:"aaa", it will filter out some rows contains "aaa", but if I click anywhere else outside of xamMultiColumnComboEditor before clicking the rows filtered out, "aaa" will stay on the xamMultiColumnComboEditor. Could you please advise how to empty the "aaa" when clicking anywhere outside of xamMultiColumnComboEditor before selecting the row?
Thanks,
suqing
Hello Qing li,
I could suggest you to find the SpecialixedTextBox element that is used in the XamMultiComboEditor to display selected or entered text. Then you could handle DropDownClosed event and easily set the Text to empty string if the SelectedItem is equal to null. The following code snippet illustrate the suggested approach:
DisplayMemberPath="Name" FilterMode="FilterOnAllColumns" DropDownClosed="myCombo_DropDownClosed" />
private void myCombo_DropDownClosed(object sender, EventArgs e){ if ((sender as XamMultiColumnComboEditor).SelectedItem == null) { SpecializedTextBox sptxt = Utilities.GetDescendantFromName((sender as XamMultiColumnComboEditor) as DependencyObject, "TextBoxPresenter") as SpecializedTextBox; if (sptxt != null) sptxt.Text = ""; }}
Please let me know if you need any further assistance on this matter.
Sincerely, ZhivkoEntry Level Software Developer
I have a question too: When using xamMultiColumnComboEditor and filter on all columns. If I type "oe" i want a filter like i type "œ" like in french word "Cœur"
Working fine. Thanks a lot!