Empty
HTML
<script src="http://cdn.kendostatic.com/2012.1.322/js/kendo.all.min.js"></script>
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.common.min.css">
<link rel="stylesheet" href="http://cdn.kendostatic.com/2012.1.322/styles/kendo.default.min.css">
test
<div id="listView"></div>
<script type="text/x-kendo-tmpl" id="template_token_list">
<input id="action" class="comboAction" />
</script>
JavaScript
function destroyComboboxes() {
$(".comboAction[data-role=combobox]").each(function() {
var combobox = $(this).data("kendoComboBox"),
popup = combobox.popup,
element = popup.wrapper[0] ? popup.wrapper : popup.element;
//remove popup element;
element.remove();
//unwrap element
combobox.element.show().insertBefore(combobox.wrapper);
combobox.wrapper.remove();
combobox.element.removeData("kendoComboBox");
});
}
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "http://search.twitter.com/search.json",
// the remove service url
dataType: "jsonp",
// JSONP (JSON with padding) is required for cross-domain AJAX
data: { //additional parameters sent to the remote service
q: function() {
return $("#searchfor").val();
}
}
}
},
schema: { // describe the result format
data: "results" // the data which the data source will be bound to is in the "results" field
}
});
var items = [
{
text: " ",
value: "0"},
{
text: "riavviare totem",
value: "1"},
{
text: "riavviare software",
value: "2"},
{
text: "refresh image",
value: "3"},
{
text: "attivare assistenza",
value: "4"}
];
$("#listView").kendoListView({
dataSource: dataSource,
dataBound: function() {
$(".comboAction").kendoComboBox({
dataTextField: "text",
dataValueField: "value",
dataSource: items
});
},
template: kendo.template($("#template_token_list").html())
});
myTimer = setInterval(function() {
destroyComboboxes();
var listView = $("#listView").data("kendoListView");
listView.refresh();
}, 5000);