Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Autocomplete entry and picker does not work at closing and opening the app again

$
0
0

In a page I have an autocomplete entry and a picker. When I open the app and I do the query, it does well, when I write something on the entry it autocomplete, and the picker I can choose the data. The issue comes when I close the app and I do open it again, the entry does not autocomplete and the picker elements are empty.
I saw into the webservice console and the app does the query successfully but the app does not charge the content to picker neither the rentry.
I am using MVVM. This is the page code from the view.

public partial class ExistenciaPage : ContentPage
{

    ExistenciaViewModelMacro existenciaVM;

    public ExistenciaPage ()
    {
        InitializeComponent();
        existenciaVM = new ExistenciaViewModelMacro();
        BindingContext = existenciaVM;
    }

    protected override void OnAppearing()
    {
        try
        {
            base.OnAppearing();
            buscarEntry.ItemsSource = existenciaVM.AutoCompleteDescripcion;
            almacenPicker.ItemsSource = existenciaVM.Almacenes;
        }
        catch (Exception ex)
        {
            string message = ex.Message;
            almacenLabel.Text = message;
        }
    }
};

P.S. Sorry my english is very bad, I'm still learning.


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>