Hi,
I need display empty value in xamdatagrid if saved value GUID doesnt exists in ComboBoxItemsProvider.
But I still see GUID value.
THX for help.
foreach (DataRow dr in dt.Rows)
{
provider.Items.Add(new Infragistics.Windows.Editors.ComboBoxDataItem(new Guid(dr["id"].ToString()), dr["name"].ToString()));
}
Style s = new Style(typeof(Infragistics.Windows.Editors.XamComboEditor));
Setter set = new Setter(Infragistics.Windows.Editors.XamComboEditor.ItemsProviderProperty, provider);
s.Setters.Add(set);
field.Settings.EditorStyle = s;
Hello,
It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I suggest you use the following code in your XamComboEditor’s EditModeEnding event:
XamComboEditor combo = (sender as XamComboEditor); if (combo.Value.ToString() != String.Empty) { if (!(combo.ItemsProvider.ItemsSource as ObservableCollection<Guid>).Contains(Guid.Parse(combo.Value.ToString()))) { combo.Value = String.Empty; } }
Feel free to write me if you have further questions.