Skip to content

Instantly share code, notes, and snippets.

@sagar-ganatra
Created June 21, 2012 11:54
Show Gist options
  • Save sagar-ganatra/2965357 to your computer and use it in GitHub Desktop.
Save sagar-ganatra/2965357 to your computer and use it in GitHub Desktop.
<!DOCTYPE HTML>
<html>
<head>
<script src="../../js/jquery.min.js"></script>
<script src="../../js/kendo.all.min.js"></script>
<script>
$('document').ready(function() {
viewModel = kendo.observable({
optionsData: [
{optionValue:1, optionName: "test1"},
{optionValue:2, optionName: "test2"},
{optionValue:3, optionName: "test3"}
]
});
kendo.bind($('select'),viewModel);
});
</script>
</head>
<body>
Select example:
<select data-template="select-template" data-bind="source: optionsData">
</select>
<script id="select-template" type="text/x-kendo-template">
<option data-bind="attr: {value: optionValue}, html: optionName">
</option>
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment