Hi,
I need to show suggestios when user focues on control or deletes text completely but this is not working as expected. My custom filter function already retruns data properly for empty search strings.
This is my TextCahnged event implemtation:
private void usersAutoCompleteView_TextChanged(object sender, TextChangedEventArgs e)
{
var control = (RadAutoCompleteView)sender;
if (string.IsNullOrEmpty(e.NewTextValue) && !string.IsNullOrEmpty(e.OldTextValue))
{
control.ShowSuggestions();
}
}
And this is my Focused event implementation:
private void usersAutoCompleteView_Focused(object sender, FocusEventArgs e)
{
var control = (RadAutoCompleteView)sender;
if (string.IsNullOrEmpty(control.SearchText))
{
control.ShowSuggestions();
}
}
private void usersAutoCompleteView_SuggestionItemSelected(object sender, Telerik.XamarinForms.Input.AutoComplete.SuggestionItemSelectedEventArgs e)
{
MyUser = (e.DataItem as MyModel).User;
}
If I use Focused for showing Suggestions everything works fine, but when I added TextChanged nothings works as shoud:
1) Suggestion menu is never shown from TextChanged event
2) When I select Item from Suggsetion menu, text on the control gets immediately deleted (Text changed is getting called again with empty NewTextValue)
3) When I remove usage for TextChanged event misbehaviour is still there. I need to clean whole build/restart VS/emulator to get it running again.
How should I achieve this functionality? It should be simple, for me it's looks like a common scenario
Hi,
I am trying to change cursor color and border when AutoCompleteView is in Focus. How to do this? I can't find any renderer for this control in Telerik.XamarinForms.InputRenderer Namespace
I keep running into:
Java.Lang.RuntimeException: Font asset not found Fonts/telerikfont.ttf
When trying to access any page with an AutoCompleteView.
I'm not sure why this started happening. This used to work fine and I never had to include any sort of Telerik fonts in my project, nor do I reference any. I tried downloading the font and including it where it wanted (Assets/Fonts/telerikfont.ttf) and it still barks at me as if it doesn't see it.
Hi, I am using remote search and I need to show all elements after the Focused when the Text is empty (after focused I can get ItemsSource but the Suggestions PopUp is empty) !!! How can I do that?
Thank you...
Hi Support,
I have a RadAutoCompleteView (see below definitions) and everything works except when the item is too long and it spans 2 rows in the result view. When user selects this long item and the drop down is closed, the selected item text is right aligned in the control. For example, the item shows like this in the drop down box:
1st line - Nursing and residential care facilities
2nd line - and long term care homes
User selects this item and returns to the control, they only see:
"facilities and long term care homes". User will need to press the home button in order to go to the start of the text.
How do I code it so that the text is automatically left justified once returned from the result view into the control? Please help.
<telerikInput:RadAutoCompleteView x:Name="MainAutoCompleteSectors"
HeightRequest="35"
NoResultsMessage="No results."
BorderThickness="1"
BorderColor="Silver"
SuggestionViewHeight="150"
ItemsSource="{Binding Sectors}"
TextSearchPath="CombinedName"
BackgroundColor="White"
SuggestMode="Suggest"
CompletionMode="Contains"
Watermark="Start typing here to start search..."
WatermarkTextColor="Black"
TextChanged="AutoCompleteSectors_TextChanged"
FontSize="12"
SearchThreshold="2"
TextColor="Black"
SuggestionItemTextColor="Black"
SuggestionItemSelected="Handle_SuggestionSectorItemSelected"
HorizontalOptions="FillAndExpand">
<telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
<DataTemplate>
<ViewCell>
<autoCompleteView:SuggestionItemLabel TextColor="Black"
Padding="5,0"
HighlightTextColor="{StaticResource OrangeTextColor}"
UnformattedText="{Binding CombinedName}"
HighlightText="{Binding Source={x:Reference MainAutoCompleteSectors}, Path=Text}"/>
</ViewCell>
</DataTemplate>
</telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
</telerikInput:RadAutoCompleteView>
Hi,
I'm trying to change the color of telerikInput:RadAutoCompleteView close icon, default it's dark,
I need to assign a color to it, can anyone help me
So I am getting the "selected item" like so
<
input:RadAutoCompleteView.Behaviors
>
<
xct:EventToCommandBehavior
Command
=
"{Binding CommandEquipmentListItemSelected}"
EventName
=
"SuggestionItemSelected"
/>
</
input:RadAutoCompleteView.Behaviors
>
Then in my view model I cast it like so ...
if
(arg
is
null
)
return
;
var tmpRadRadAutoCompleteView = arg
as
SuggestionItemSelectedEventArgs;
if
(tmpRadRadAutoCompleteView.DataItem
is
not
null
)
{
JCJob job = (JCJob)tmpRadRadAutoCompleteView.DataItem;
Which works fine ... until .. the user hit's the return key on the keyboard ...
It then fires the command again and selects (passes in) the first item in the list ....
Obviously this is not desired behavior ....
Hi,
I am using the AutoCompleteView in a Xamarin.Forms application running on iOS. The device is set to Dark Mode however I have set SuggestionViewBackgroundColor to White, however the SuggestionView still has a black background. I am running v2020.2.624.1.
Is this corrected in a later version of the library or do I need to use another approach to set the SuggestionViewBackgroundColor?
Kind regards,
Denise
Hi, I have just begun using RadAutoCompleteView, and now I am looking for a way to set its selected items (tokens) in code-behind when I am going to open my entity's detail page in edition mode.
P.s. I am not using MVVM architecture and setting my control's ItemsSource programmatically:
Class:
public class Activity
{
public string Id { get; set; }
public List<string> ProductIds { get; set; }
}
ItemsSource: SomeListOfProducts.
What I'm going to do:
For each productId in ProductIds, I add a token to my RadAutoCompleteView that: token = SomeListOfProducts.Single(x => x.Id == productId).