To store and reassign the selectedItem in Parent screen on close of Popup window RRS feed

  • Question

  • Hi guys,

               I am using Visual Studio 2015 Update 3 for LightSwitch HTMLClient

               I am having Users Listview in the main screen. After selecting an item in the Users list and on click of View button I am viewing the details of the selected User.

               After close is clicked in Popup screen, I am calling the below code for Execute event           

    myapp.navigateBack().then(function () {

               Because of this, the parent page is refreshing and I am not able to select the same user again in the main screen.

         beforeShown: function (screen) {
         afterClosed: function (screen, navigationAction) {
               screen.Users.selectedItem = strOldSelected;

           Before loading of popup, in the execute event of Submit, I am retrieving the selected value as follows

    strOldSelected = screen.Users.selectedItem;

            For me now the strOldSelected value is coming as undefined.

            How can I achieve selecting of same item in Users Listview on close of Popup and after refreshing of main page.

            Any help would be greatly appreciated.

    Regards, CPK_2011

    • Edited by CPK_2011 Tuesday, October 30, 2018 11:09 AM
    Tuesday, October 30, 2018 10:47 AM