Hello.
We use XamComboEditor with following Properties
<igEditors:XamComboEditor IsEditable="True" />
and following Style for ComboBoxItem to disable and hide items in the editor
<Style TargetType="ComboBoxItem"> <Setter Property="Visibility" Value="{Binding IsBusinessActive, Converter={StaticResource BooleanToVisibilityConverter}, FallbackValue=Visible}"/> <Setter Property="IsEnabled" Value="{Binding IsBusinessActive, FallbackValue=true}" /> </Style>
This works for the entries in the drop down selected with mouse.
But if the user enters text (autocomplete) or use the KeyUp or KeyDown on the keyboard the whole datasource is available.
Is there any solution for this issue?
Roman
for example, our dataset is looks like:
Item1:
IsBusinessActiv = True
Name = ABC
Item2:
IsBusinessActiv = False
Name = DEF
Item3:
Name = GHJ
The ComboEdit shows Item1 and Item3. This is Correct. But if I Search the Item2 with the keyword "DEF" the Item2 become our selected value. This scenario should not happen.
Hello Roman,
Thank you for your posts!
I have been looking into your question. Currently when you change the Visibility of the and item into the drop down of the XamComboEditor, it will hide the item from the drop down, but the item remains in the ItemsSource of the editor.
When you type some text into the XamComboEdior it searches through the ItemsSource to find this item. The same is true when you press the Up and Down arrow keys. This is why the behavior the you see is expected.
If you want not to see some of the items I can suggest to remove them from the data source itself. Please do not hesitate to let me know if you have any further questions on this matter.
The problem is, that are old items which should be shown as selected value, but these old items should not be selectable anymore.
Is there any way not to delete the items from the source?
I am just checking if you have any further questions on this matter. Please do not hesitate to let me know if you do.