Plaidesquique
New Member
I'm having massive problems with databinding to a ListView in a Windows 8 app using Javascript.Inside the "activated" event on default.js I have written some code to get some data from a web service and push it into an array. This bit works OK and the array is populated.The problem I have is that the app won't recognise the data. I have this code in a page called inspections.html:\[code\]data-win-options="{itemTemplate: select('#imageTextListCollectionTemplate'), itemDataSource: dataList.dataSource, layout: {type: WinJS.UI.ListLayout}}\[/code\]and then in the "activated" event I declare:\[code\]var dataList = new Array();\[/code\]and push the data from the web service into this array. But at runtime I get an error that says something along the lines of "can't find dataSource on undefined dataList".I've done some of the examples on the MS website and in one of them it creates a dummy dataset and references it from a namespace. I kinda think that what I'm missing here is a namespace too but I don't know what the namespace for default.js is. Or maybe I'm wrong and it's something totally different.Please help - this is so fundamental (and should be easy) but I can't get my head around it.