Telerik Forums
UI for Xamarin Forum
1 answer
89 views

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

 

19 answers
396 views
I have a list of people with their email/name loaded into my autocomplete. Is there a way I can pre-load a selected person object into the autocomplete? I've tried binding the Text property to my view-model, but that doesn't seem to do anything. Any help would be appreciated.
Yana
Telerik team
 answered on 19 Mar 2021
1 answer
117 views

I have an Autocomplete control that is bound to an ObservableCollection of my view search result view models. However, when I update the collection (clear it and add each result) the control only shows the "No Results Found" message.

I'm not using any code behind for this, I have a Behavior that handles the TextChanged event which calls an ICommand on my view model to update the list of results. I've posted the code for my view below, if you need more context I can provide the Behavior or View Model code as well.

View

<telerikInput:RadAutoCompleteView Grid.Row="0" ItemsSource="{Binding RetailerSearchResults, Mode=TwoWay}">
                <telerikInput:RadAutoCompleteView.Behaviors>
                    <sharedBehaviors:TelerikAutoCompleteTextChangedBehavior Command="{Binding RetailerSearchTextChangedCommand}" Timeout="1000" />
                </telerikInput:RadAutoCompleteView.Behaviors>

                <telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
                    <DataTemplate x:DataType="{x:Type viewModels:RetailerListItemViewModel}">
                        <ViewCell>
                            <Label Text="{Binding DisplayName}"></Label>
                        </ViewCell>
                    </DataTemplate>

                </telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
            </telerikInput:RadAutoCompleteView>

 


Lance | Manager Technical Support
Telerik team
 answered on 02 Nov 2020
1 answer
25 views

I am having a real issue with the SuggestionItemSelected="TxtmanualStockCode_SuggestionItemSelected" it doesnt allow the return of a full code as soon as the user enters the first letter it fires.

 

Is their anyway to detect if the user has pressed the return key on the google g board keyboard?.

 

 

Didi
Telerik team
 answered on 09 Sep 2019
1 answer
35 views

I have a customer filter that should be searching the description field as well but I think its not cause the text search path is set to reference how to do i get it so that it honours my path

 

/// Class CustomAutoCompleteViewFilter.
/// Implements the <see cref="Telerik.XamarinForms.Input.AutoComplete.IAutoCompleteFilter" />
/// </summary>
/// <seealso cref="Telerik.XamarinForms.Input.AutoComplete.IAutoCompleteFilter" />
public class CustomAutoCompleteViewFilter : IAutoCompleteFilter
{
    /// <summary>
    /// Filters the specified item.
    /// </summary>
    /// <param name="item">The item.</param>
    /// <param name="searchText">The search text.</param>
    /// <param name="completionMode">The completion mode.</param>
    /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
    public bool Filter(object item, string searchText, CompletionMode completionMode)
    {
        StockAutoCompleteInfo stock = (StockAutoCompleteInfo)item;
        string lowerReference = stock.Code.ToLower();
        string lowerDescription = stock.Description.ToLower();
        string lowerSearchText = searchText.ToLower();
        return lowerReference.Contains(lowerSearchText) || lowerDescription.Contains(lowerSearchText);
    }
}
}

 

<telerikInput:RadAutoCompleteView x:Name="txtCode" SuggestionViewHeight="300"  CompletionMode="StartsWith"  TextSearchPath="Reference" Watermark="Search for Bom here...">
    <telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
        <DataTemplate>
            <ViewCell>
                <StackLayout Orientation="Vertical">
                    <Label Text="{Binding Reference}"/>
                    <Label Text="{Binding Description}"/>
                    <BoxView BackgroundColor="Black" HeightRequest="1"  HorizontalOptions="StartAndExpand"/>
                </StackLayout>
            </ViewCell>
        </DataTemplate>
    </telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
</telerikInput:RadAutoCompleteView>
<telerikInput:RadButton x:Name="btnFindBom"  BackgroundColor="#343C41" TextColor="White"  Clicked="BtnGetBomInfo_Clicked"  Text="Find Bom"></telerikInput:RadButton>

 

Yana
Telerik team
 answered on 23 Aug 2019
1 answer
85 views

Hi There

when we use SuggestionItemTemplate in our autocomplete to add custom design to the suggestions items, it is not consistent. Some of the row data are missing from there(Please see the attached 1st image). But in android it is very consistent(2nd image).Everything is showing perfectly.

 

 <telerikInput:RadAutoComplete x:Name="autoCompleteWatermark" 
                                                          ItemsSource="{Binding Options}" 
                                                          VerticalOptions="Start" 
                                                          NoResultsMessage="there are no matching items..." 
                                                          Watermark="Search here..."
                                                          SuggestionItemSelected="AutoComplete_OnSuggestionItemSelected">

                                            <telerikInput:RadAutoComplete.SuggestionViewHeight>
                                                <OnPlatform x:TypeArguments="x:Double"
                                                            Android="150"
                                                            iOS="150" />
                                            </telerikInput:RadAutoComplete.SuggestionViewHeight>

                                            <telerikInput:RadAutoComplete.SuggestionItemTemplate>
                                                <DataTemplate>
                                                    <Grid>
                                                        <Grid.ColumnDefinitions>
                                                            <ColumnDefinition Width="*" />
                                                        </Grid.ColumnDefinitions>
                                                        <telerikPrimitives:RadBorder BorderColor="#4488F6" CornerRadius="3">
                                                            <Label Margin="5"
                                                             FontSize="Medium"
                                                             Text="{Binding Item}"
                                                             Style="{StaticResource RegularLabel }"
                                                             TextColor="Black" />
                                                        </telerikPrimitives:RadBorder>
                                                    </Grid>
                                                </DataTemplate>
                                            </telerikInput:RadAutoComplete.SuggestionItemTemplate>
                                        </telerikInput:RadAutoComplete>

Didi
Telerik team
 answered on 11 Jun 2019
7 answers
172 views

Hello,

I am using Telerik autocomplete and add filter button near autocomplete.If user click filter then autocomplete suggestion(also noResultMessage) must close but it dont.When click filter button then Filter frame opening behind the suggestionView.I want to opening frame in front.

Telerik Version : 2018.2.620.2 (we will update later)

here is xaml code

__________________________________

            <Frame HasShadow="True" Margin="10,10,10,10" HorizontalOptions="FillAndExpand" VerticalOptions="Start" Padding="0" WidthRequest="400">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                    </Grid.ColumnDefinitions>
                    <telerikInput:RadAutoComplete x:Name="autoCompleteFilter" Grid.Row="0" Grid.Column="0"
                        ItemsSource="" 
                        SuggestionItemSelected=""
                        TextSearchPath=""  
                        CompletionMode="Contains"
                        FontSize="15"
                        Watermark="{Binding FilterHintText}"
                            NoResultsMessage="{translate:Translate  noRecordFound}"                                              
                        BackgroundColor="White" VerticalOptions="Center" >
                        <telerikInput:RadAutoComplete.Effects >
                            <effects:AutoCompleteEffect/>
                        </telerikInput:RadAutoComplete.Effects>
                        <telerikInput:RadAutoComplete.SuggestionViewHeight>
                            <OnPlatform x:TypeArguments="x:Double"
                                Android="200"
                                iOS="200" />
                        </telerikInput:RadAutoComplete.SuggestionViewHeight>
                    </telerikInput:RadAutoComplete>
                    <Button Text="" BackgroundColor="White"  WidthRequest="40" HorizontalOptions="End"
                  Command="{Binding OnFilterClick}" Image="FilterIcon.png"  />
                </Grid>
            </Frame>

     ####When filter clicks,This frame open behind suggestionViews But it must open above suggestionViews
            <Frame BackgroundColor="White" x:Name="FilterSelectionView" HeightRequest="75" IsVisible="{Binding IsFilterVisible}" WidthRequest="100" Padding="0" TranslationY="64" Margin="0,0,15,0" VerticalOptions="Start" HorizontalOptions="End">
                <StackLayout>
                    <Button  Text="" WidthRequest="70"  HeightRequest="35" BackgroundColor="White" Font="13" Command="{Binding ..}"/>
                    <Button Text="" WidthRequest="70"  HeightRequest="35" BackgroundColor="White" Font="13" Command="{Binding ..}"/>
                </StackLayout>
            </Frame>

__________________________________

 

Here is ViewModel Filter Click Command

__________________________________

        private void OnFilterClicked(object obj)
        {
            if (radAutoComplete != null)
                radAutoComplete.Text = string.Empty;    //here is working(It clears string) but suggestion views or noResultMessage dont close

            if (IsFilterVisible)
            {
                IsFilterVisible = false;
            }
            else
                IsFilterVisible = true;
        }

________________________________

 

Thank you for your helps

Lance | Manager Technical Support
Telerik team
 answered on 25 Mar 2019
5 answers
103 views

Hi guys,

How to :

1) Focus control ? By focus I mean that keyboard should pop up, and now after calling Focus nothing happens.

2) Change styling of text box ?

3) Dynamicaly load suggested items on the fly?

4) Change the message of "no items found" ?

 

Best Regards

Didi
Telerik team
 answered on 08 Jan 2019
1 answer
121 views

Hi I am new to xamarin forms. How can I use selecteditem for the multiple Autocomplete controller which are inside a Listview already

 

 

 

<telerikDataControls:RadListView x:Name="listView" ItemsSource="{Binding QuantityRows}"  ItemTapped="Item_Selected" Grid.Row="1">
                <telerikDataControls:RadListView.ItemTemplate>
                    <DataTemplate>
                        <telerikListView:ListViewTemplateCell>
                            <telerikListView:ListViewTemplateCell.View>
                                  <Label Text="{Binding FieldDescription}"></Label>
                                    <telerikInput:RadAutoComplete x:Name="autoCompleteWatermark"                                                         

                                                          ItemsSource="{Binding Listing}" 
                                                          TextSearchPath="Name" 
                                                          VerticalOptions="Start" 
                                                          NoResultsMessage="there are no matching items..." 
                                                          Watermark="Search here..." />
                                   </telerikListView:ListViewTemplateCell.View>
                            </telerikListView:ListViewTemplateCell>
                     </DataTemplate>
                </telerikDataControls:RadListView.ItemTemplate>
            </telerikDataControls:RadListView>

Didi
Telerik team
 answered on 23 Oct 2018
2 answers
67 views

Hi and thanks in advance.

I want to use the autocomplete in Append mode only and this is the setup of the control:

ItemsSource="{Binding References}"                                   
TextSearchPath="Name" SearchThreshold="3"
ShowSuggestionView="False" SuggestMode="Append"     
DisplayMode="Plain" CompletionMode="StartsWith"
NoResultsMessage="No matching references..."     
IsClearButtonVisible="True"
SuggestionItemTextColor="{DynamicResource ColorPrimary}"
SuggestionItemSelected="VisitorReferenceAutocomplete_OnSuggestionItemSelected"
FilteredItemsChanged="VisitorReferenceAutocomplete_OnFilteredItemsChanged"
Style="{StaticResource AutocompleteBaseStyle}"

After 3 digits a match is found and the FilteredItemsChanged event is triggered correctly but the cursor inside the textbox goes back to the start position and the name inside the textbox is not autocompleted at all. Moreover...what is the behavior of the clear button? Sometimes it works e and sometimes not, in any case how I can understand that the selection is now empty (FilteredItemsChanged  again?).

The Xamarin.Forms version is the last 3.1.0.697729 and the solution targets only android platform (8.1 Oreo, api 27)

 

Didi
Telerik team
 answered on 13 Sep 2018
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?