Option to add loading while loading the suggestion

Hi

I am currently working on a screen in which we are having a  auto compelete which fetches the data remotely currently I am facing 2 problems there

a)The user enters the text according to which the suggestion are fetched remotely over a internet currently there is bit delay in getting the data for that time being 
"No record found" is shown Is there a option to show loading message there

b) The Suggestions are returned based on some matching done remotely here the autocomplete performs it's filtering too, I have seen filtering modes like contains, begins with, ends, custom etc. How can we avoid the filtering by autocomplete.

Thanks in advance for the help

1 Reply

AS Anandraj Selvam Syncfusion Team March 22, 2020 09:39 AM UTC

Hi Ajith Gopalakrishnan, 
  
Greetings from the Syncfusion. 
  
Query 1: “Is there an option to show loading message” 
  
We have checked the reported query and we have achieved your requirement using DropDownHeaderView as in below: 
  
Code Snippet
  
 
<autocomplete:SfAutoComplete.DropDownHeaderView> 
                <StackLayout Orientation="Horizontal" > 
                    <Label Text="Loading" VerticalTextAlignment="Center" HorizontalOptions="Center" VerticalOptions="Center"/> 
                    <ActivityIndicator IsRunning="True" /> 
                </StackLayout> 
</autocomplete:SfAutoComplete.DropDownHeaderView> 
 
 
private void autoComplete_FilterCollectionChanged(object sender, Syncfusion.SfAutoComplete.XForms.FilterCollectionChangedEventArgs e) 
            if ((sender as SfAutoComplete).FilteredItems.Count() > 0) 
           
                autoComplete.ShowDropDownHeaderView = false; 
           
            else 
           
                autoComplete.ShowDropDownHeaderView = true; 
           
 
 
  
  
Query 2: “How can we avoid the filtering by autocomplete” 
  
This can be achieved by setting the Suggestionmode to custom and return false to the Filter items as in below: 
  
Code Snippet: 
  
 
autoComplete.Filter = AvoidFilter; 
 
public bool AvoidFilter(string search, object item) 
            return false; 
 
 
  
  
Please revert us further investigation. 
  
Regards, 
Anand Raj S. 


Loader.
Up arrow icon