I have a RadAutoCompleteBox:
<
telerik:RadAutoCompleteBox
x:Name
=
"CustomerAutoCompleteBox"
Grid.Row
=
"10"
Grid.Column
=
"1"
Margin
=
"3"
IsEnabled
=
"{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}"
ItemsSource
=
"{Binding Occurrence.Appointment.AllCustomerResourceTypesForDialog, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
SearchText
=
"{Binding Occurrence.Appointment.AllCustomerResourceTypesSearchText, BindsDirectlyToSource=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
SelectedItem
=
"{Binding Occurrence.Appointment.Customer, ValidatesOnDataErrors=True, NotifyOnValidationError=True, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
IsDropDownOpen
=
"{Binding Occurrence.Appointment.IsCustomerDropDownOpen, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
SelectionMode
=
"Single"
DisplayMemberPath
=
"DisplayName"
TextSearchPath
=
"DisplayName"
MinWidth
=
"218"
>
</
telerik:RadAutoCompleteBox
>
The Appointment which is Bound is Created and filled with data like this:
var telerikAppointment = new ExtendedAppointment();
var customerResource = new Resource
{
DisplayName = ((ModelsPath.Customer)appointment.Models[0]).KUNAM1.Trim(),
ResourceName = ((ModelsPath.Customer)appointment.Models[0]).CustomerId.ToString().Trim(),
ResourceType = Application.Current.FindResource("ResourceName.Customer") as string
};
telerikAppointment.AllCustomerResourceTypesForDialog.Clear();
telerikAppointment.AllCustomerResourceTypesForDialog.Add(customerResource);
telerikAppointment.Customer = customerResource;
Not my problem is, that the AllCustomerResourceTypesSearchText Property is not Updated when i start the AutoCompleteBox with a CustomerResource in it. When i tyoe some Text in it now to Search for another one the AllCustomerResourceTypesSearchText is not updaten and then my application is not searching for more Customers in the Database.
It Works fine if i start the RadBox without a pre selected Customer and AllCustomerResourceTypesForDialog and then try to search
Customer is a Resource and AllCustomerResourceTypesForDialog is a ObservableCollection<Resource>
I dont know how to fix this Problem so the bound AllCustomerResourceTypesSearchText Property is always updated.