0
我有一個頁面,提供用戶5下拉列表與安全問題。它們通過本地DataSource對象進行設置,這基本上是對象中的10個問題。我想將所有5個下拉列表綁定到相同的DataSource,並且選擇一個Question,將其從DataSource中移除,因此您無法爲下一個問題選擇它。這是我到目前爲止的代碼:多個下拉列表與一個DataSource Kendo
var questions =
[{
value: "Your first pet\'s name?"
},
{
value: "Your favorite teacher?"
},
{
value: "The city you were born in?"
},
{
value: "Your mother\'s maiden name?"
},
{
value: "The high school you attended?"
},
{
value: "First name of the first person you kissed?"
},
{
value: "What did you want to be when you grow up?"
},
{
value: "The brand of your first car?"
},
{
value: "Your favorite city?"
}];
var localDataSource = new kendo.data.DataSource({
data: questions
});
var dropdown = $('.dropdownlist');
dropdown.kendoDropDownList({
dataTextField: "value",
dataValueField: "value",
dataSource: localDataSource
});
而我的HTML渲染領域:
<input class="dropdownlist w250px" name="questions[1][question]" />
時報5的每一個問題。