Hi,
I need use RadAutoCompleteBox instead DataFormComboBoxField which works perfectly.
Problem is when I start editing. In ComboBox selectedItem is showing but in AutoCompleteBox is blank space.
works:
<
telerik:DataFormComboBoxField
ItemsSource
=
"{Binding DataView, ElementName=UmowyDataSource}"
DataMemberBinding
=
"{Binding UmowaId,Mode=TwoWay}"
DisplayMemberPath
=
"NumerUmowy"
SelectedValuePath
=
"Identyfikator"
Label
=
"Umowa"
/>
not works corectly:
<
telerik:RadAutoCompleteBox
ItemsSource
=
"{Binding DataView, ElementName=UmowyDataSource}"
DisplayMemberPath
=
"NumerUmowy"
SelectionMode
=
"Single"
Name
=
"Umowa"
SelectedItem
=
"{Binding Path=UmowaId,Mode=TwoWay,Converter={StaticResource ProjektyStatusConverter}}"
TextSearchMode
=
"Contains"
TextSearchPath
=
"NumerUmowy"
/>
Also
Convert:
public
class
ProjektyStatusConverter : IValueConverter
{
public
object
Convert(
object
value, Type targetType,
object
parameter, System.Globalization.CultureInfo culture)
{
if
(value !=
null
)
{
return
value;
}
else
{
return
value;
}
}
public
object
ConvertBack(
object
value, Type targetType,
object
parameter, System.Globalization.CultureInfo culture)
{
if
(value !=
null
)
{
UmowyItem umowa = value
as
UmowyItem;
Int32 umowaID = umowa.Identyfikator;
return
umowaID;
}
else
{
return
value;
}
}
}
I need implementing RadAutoCompleteBox with binding. When i start editing in RadAutoCompleteBox must be correct item