none
Unhandled exception at line 23142, column 25 in ms-appx://microsoft.winjs.2.0/js/ui.js 0x800a138f - JavaScript runtime error: Unable to get property 'dataSource' of undefined or null reference

    Question

  • Hi, 

    I am trying to create a navigation app with 2 pages. 

    Page A -> Pulls a list of feeds from the internet and displays in a list view. When a user clicks on the item, it navigates to Page B. I am using the following code for navigation:

        function NavigateToDetails()
        {
            var list = document.getElementById('favouriteList').winControl;

            var data;
            list.selection.getItems().then(function (item) {
                data = item[0].data;
            });

            nav.navigate("/pages/KBDetails/KBDetails.html", data);
        }

    The navigation works fine and i see the second page. 

    When i click on the back button on the Page B i get back to the Page A. The problem is here. 

    When i again click on any of the items, the navigation occurs. But i get the following unhandled exception:

       SCRIPT5007: Unhandled exception at line 23142, column 25 in ms-appx://microsoft.winjs.2.0/js/ui.js
    0x800a138f - JavaScript runtime error: Unable to get property 'dataSource' of undefined or null reference
       File: ui.js, Line: 23142, Column: 25

    The issues seems to be here

                    itemDataSource: {
                        get: function () {
                            return this._itemsManager.dataSource;
                        },

    I am having issues trying to figure what might be causing this issue. Any pointers would help. 

    Thanks

    Gurpreet Singh

    Saturday, November 23, 2013 2:06 AM

Answers

All replies