Note that there are some explanatory texts on larger screens.

plurals
  1. POPorting Azure connectivity sample to a windows store javascript navigation app
    primarykey
    data
    text
    <p>Am working on a windows store javascript application. The application will be using data from azure. When I tried to port the azure connectivity sample to a navigation template, the list view displayed the entire columns from the table. I used the same data read code from the sample. The html page and css were identical to the sample.</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;meta charset="utf-8" /&gt; &lt;!--head segment--&gt; &lt;title&gt;QuickStart&lt;/title&gt; &lt;!-- WinJS references --&gt; &lt;link href="//Microsoft.WinJS.1.0/css/ui-light.css" rel="stylesheet" /&gt; &lt;script src="//Microsoft.WinJS.1.0/js/base.js"&gt;&lt;/script&gt; &lt;script src="//Microsoft.WinJS.1.0/js/ui.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="/MobileServicesJavaScriptClient/MobileServices.js"&gt;&lt;/script&gt; &lt;!-- QuickStart references --&gt; &lt;link href="/css/default.css" rel="stylesheet" /&gt; &lt;script src="/js/default.js"&gt;&lt;/script&gt; &lt;script src="/pages/Advertisement/advertisement.js"&gt;&lt;/script&gt; &lt;link href="/pages/Advertisement/advertisement.css" rel="stylesheet" /&gt; &lt;/head&gt; &lt;body&gt; &lt;!--body segment--&gt; &lt;div style="margin: 50px 10px 10px 50px" id="overalldiv"&gt; &lt;div style="display: -ms-grid; -ms-grid-columns: 1fr 1fr; -ms-grid-rows: auto 1fr;"&gt; &lt;div style="-ms-grid-column-span: 2; margin: 0px 0px 20px 0px;"&gt; &lt;div style="color: #0094ff; font-size: 8pt"&gt;WINDOWS AZURE MOBILE SERVICES&lt;/div&gt; &lt;div style="color: #808080; font-size: 32pt"&gt;Sample&lt;/div&gt; &lt;/div&gt; &lt;div style="-ms-grid-row: 2; -ms-grid-column: 1;"&gt; &lt;div style="display: -ms-grid; -ms-grid-columns: auto 1fr"&gt; &lt;div style="-ms-grid-column: 1;" class="tasknumber"&gt; 1 &lt;/div&gt; &lt;div style="-ms-grid-column: 2"&gt; &lt;strong&gt;Insert a TodoItem&lt;/strong&gt;&lt;br /&gt; &lt;span style="font-size: small"&gt;Enter some text below and click Save to insert a new todo item into your database&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="margin: 5px 0px 0px 72px; -ms-grid-column: 2"&gt; &lt;input type="text" id="textInput" /&gt; &lt;button id="buttonSave" style="margin-left: 5px"&gt;Save&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="-ms-grid-column: 2; -ms-grid-row: 2;"&gt; &lt;div style="display: -ms-grid; -ms-grid-rows: auto 1fr"&gt; &lt;div style="-ms-grid-row: 1"&gt; &lt;div style="display: -ms-grid; -ms-grid-columns: auto 1fr"&gt; &lt;div style="-ms-grid-column: 1; float: left;" class="tasknumber"&gt; 2 &lt;/div&gt; &lt;div style="-ms-grid-column: 2"&gt; &lt;strong&gt;Query and Update Data&lt;/strong&gt;&lt;br /&gt; &lt;span style="font-size: small"&gt;Click refresh below to load the unfinished TodoItems from your database. Use the checkbox to complete and update your TodoItems&lt;/span&gt; &lt;/div&gt; &lt;/div&gt; &lt;div style="margin: 5px 0px 0px 72px"&gt; &lt;button id="buttonRefresh"&gt;Refresh&lt;/button&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="TemplateItem" data-win-control="WinJS.Binding.Template"&gt; &lt;div style="display: -ms-grid; -ms-grid-columns: auto 1fr"&gt; &lt;input class="itemCheckbox" type="checkbox" data-win-bind="checked: complete; dataContext: this" /&gt; &lt;div style="-ms-grid-column: 2; -ms-grid-row-align: center; margin-left: 5px" data-win-bind="innerText: text"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="listItems" style="-ms-grid-row: 2; margin: 20px 0px 0px 0px; -ms-grid-row-align: stretch" data-win-control="WinJS.UI.ListView" data-win-options="{ itemTemplate: TemplateItem, layout: {type: WinJS.UI.ListLayout} }"&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>The actual sample project displayed only the text field from the azure database table as shown in the below diagram. <img src="https://i.stack.imgur.com/1QqIw.jpg" alt="Screenshot of the Actual Sample Output"></p> <p>But in my case all the column fields are getting displayed <img src="https://i.stack.imgur.com/PYWIx.jpg" alt="Screenshot of my application output"></p> <p>How am I supposed to display only the required content and how am I supposed to do the formatting for the listview contents. I wanted to display the contents in the following manner</p> <p>1 <br/> ab</p> <p>2 <br/> drag</p> <p>3 <br/> dragon</p> <p>4<br/> arm .. .. ..</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload