我有一个arrayList,例如BallonColor = {red,Green},所以我需要创建2倍的下拉框,如果我有5种颜色,那么我需要有5个下拉列表,所有5个项目都是下拉列表中的选项
如何在淘汰赛中实现
我尝试了下面的代码..获取前:$data (即每一项),但在更改下拉列表的值时,绑定的$index和$data不会更改
<div data-bind = "foreach:$data" class="row">
<div class="col">
<select id ="SELECT" data-bind="options:$parent, optionsText: 'AttributeName', optionsValue: 'Id', optionsCaption: 'Select Attribute...',value : SelectedAttribute"></select>
<div data-bind="template: { name: function() { return templateName($parent,$data,SelectedAttribute) } }"></div>
<div>
<span>with any of the following values:</span>
</div>
<div class="option">
<a href="#" id = "List" class="link">List</a> | <a href="#" id= "Range" class="link">Range</a>
</div>
</div>
</div>
发布于 2012-11-27 15:50:25
https://stackoverflow.com/questions/13579251
复制相似问题