Get Listview data from a Rg.Plugins.Popup

Hi! I´m currently implementing a PopUp control with a sfListView control in it, in order for me to use it as a menu. The PopUp show as expected and I'm able to select an item from the list.

However, I need to send the data from my selection on the popup page to the parent page.

For example, I call the popup like this from a page: 

var menu = new ObjetosModelo(IdModelo, "Org");
await PopupNavigation.PushAsync(menu);

Inside the Menu, I have this method: 

public async void listaOpciones_ItemTapped(System.Object sender, Syncfusion.ListView.XForms.ItemTappedEventArgs e)
        {
                var item = e.ItemData as PopUpItems;
                
                //Organizaciones y modelos
                if (Equals(item.Id, "0") && !Equals(TipoObjeto, "Org"))
                {
                    info = new InfoNavegacion
                    {
                        IdModelo = IdModelo,
                        IdReferencia = "0",
                        IdReferencia2 = "0",
                        TipoObjeto = "mod",
                        IdTarea = "0"
                    };
                    CloseAllPopup();
                }
     }

How can I retrieve the "info" data from my page, when the selection is made in the list? I wat to navigate to the selected page, based on the selected item.

 I have attached a video with the app running, to help make my point clear haha.

Thanks in advance for your help.

Andres.



Attachment: PopUp.mp4_b4428b4d.zip

3 Replies

LN Lakshmi Natarajan Syncfusion Team September 14, 2020 09:09 AM UTC

Hi Andres, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “Get Listview data from a Rg.Plugins.Popup” from our end. We would like to inform you that you can get the SelectedItem information of the ListView loaded inside PopupPage and navigate to the corresponding page. Also, we have already documented the same requirement and you can find our online document regarding the same using the following link, 
 
Also, we would like to inform you that you need to use PushAsync method to go to the new page which adds the new page to the navigation stack. While using PopAsync, it will remove the latest page in the navigation stack and will go to the previous page. This is the behavior of navigation. 
 
Please refer the popup navigation from the following link, 
 
We have prepared a sample based on your requirement using Rg.Plugin.Popup navigation and you can refer using the below link, 
 
Please let us know if you need further assistance. 
 
Regards, 
Lakshmi Natarajan 



AA Andres Alvarado September 14, 2020 07:58 PM UTC

Hi Lakshmi! Thanks for your answer. I tried implementing the solution you provided me, but I got several errors. 

I believe I found a simpler solution. Since I'm using a Master-Detail page, when I select an option from the list, I use this code: App.Current.MainPage = new MenuPage { Detail = new NavigationPage(new ObjetivosArbol(info)) };

The app goes to the selected option. 

Thanks for your help.

Andres.


LN Lakshmi Natarajan Syncfusion Team September 15, 2020 03:14 AM UTC

Hi Andres, 
 
Thank you for the update. 
  
We are glad that your requirement has been met at your end.. Please let us know if you need any further update. As always we are happy to help you out. 
 
Lakshmi Natarajan 
  
 


Loader.
Up arrow icon