我有一个动态填充的列表,我绑定到列表视图。现在我喜欢可编辑的输入字段。我尝试了两种方式绑定,但不起作用。
这是我的模板和列表定义:
<div id="templateList" data-win-control="WinJS.Binding.Template">
<div id="templateGrid">
<div data-win-bind="innerText: project"></div>
<div data-win-bind="innerText: subProject"></div>
<div data-win-bind="innerText: activity"></div>
<div> <input id="txtTaetigkeit" type="text" data-win-bind="value: taetigkeit" /></div>
<div> <input id="txtAuftraggeber" type="text" data-win-bind="value: sAuftraggeber" /></div>
<div> <input id="txtTotal" type="number" data-win-bind="value: total" /></div>
<div> <input id="txtTotalV" type="number" data-win-bind="value: totalV" /></div>
</div>
</div>
<!-- define content -->
<div id="contentWrapper">
<div id="templateOverview">
<div id="contentGridTemplates">
<div id="userTemplates" data-win-control="WinJS.UI.ListView"
data-win-options="{itemDataSource : actTemplates.itemList.dataSource,
itemTemplate: select('#templateList'),
layout: {type: WinJS.UI.ListLayout},
tapBehavior: 'directSelect'}">
</div>
</div>
</div>
</div>
谢谢马洛