Hi,
I'm using AutoCompleteBox from Codeplex.com
Is there a way for oblige the user to select only items shown in list?
I would avoid that user can to insert custom words in database.
Thanks.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Tom MohanRank #912 · 2.3K reputationPosted Apr 14, 2015, 8:44 AM EDT
You can give a custom validation for that. Compare the user input value with autocomplete's source(in button click or lostfocus etc). If its not there in autocomplete's source then throw a message.
Roberto Salemi154 reputationPosted Apr 14, 2015, 11:37 PM EDT
Hi,
I implemented this control:
private void PropertyAutoCompleteBox_MouseLeave(object sender, MouseEventArgs e)
{
SampleProperty lastRow = (SampleProperty)dgProperties.SelectedItem;
//GET Current Select of AutoCompletBox
if ((sender as AutoCompleteBox).SelectedItem != null)
{
//TODO: fai qualcosa
}
else
ModernDialog.ShowMessage("Selezionare un elemento della lista", "Attenzione", MessageBoxButton.OK);
}
Tom MohanRank #912 · 2.3K reputationPosted Apr 15, 2015, 2:20 AM EDT