Hello,
I have a combobox set up as follows:
<editors:SfComboBox
x:Name="cboJobs"
Grid.Row="2"
Grid.ColumnSpan="3"
MaxDropDownHeight="500"
ItemsSource="{Binding Jobs}"
DisplayMemberPath="joblist"
TextMemberPath="joblist"
SelectionChanged="OncboJobChanged"
SelectedValuePath="joblist"
Placeholder="Select a job"
TextSearchMode="Contains"
IsEditable="True"
IsFilteringEnabled="True"
EnableAutoSize="True" />
I would like the user to be able to search the list but not enter their own value - i. e. the selection must be within the list. At present when "No Result Found" appears the user can leave the non-existent entry in the combobox.
If I change the IsEditable to false then the search function is not available.
Hi Ross Bell Syer,
Thank you for reaching out to us. We have reviewed your query based on your updates. We would like to inform you that if the ComboBox is set to IsEditable false, then you will not be able to edit the Entry itself; you can only select from the list provided. Therefore, any other actions such as searching or modifying entries are not possible.
For further investigation, could you please provide the exact scenario or need for searching items when IsEditable is set to false? This will help us understand your requirements better and provide a more accurate solution. Please don’t hesitate to contact us if you have any questions or concerns.
Regards,
Hariharan C.
Thanks for the above.
I have a work around by comparing the entry to the list of items using DropDownFocusClosing.
For comboboxes - how do I reset a selection to nothing in code. i.e. write the clear function.
Many thanks
Ross
Hi,
I think I have figured this out:
cboCombobox.SelectItem = null;
Thanks
Ross
Hi Ross Bell Syer,
It's great to know that you've found a solution. Should you require additional support, feel free to reach out. We're always here to assist you.
Regards,
Preethi R