Skip to content

Commit 6f4e4de

Browse files
committed
Document list dimensions in MVVM
1 parent 4527d54 commit 6f4e4de

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

web/dropdownlist/overview.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ that initialization is done within $(document).ready() statement.
3030
> Widget copies any styles and CSS classes from the input element to the wrapper element.
3131
3232
### Initialize a DropDownList using a jQuery selector
33-
33+
3434
<input id="dropdownlist">
35-
35+
3636
<script>
3737
$(document).ready(function() {
3838
$("#dropdownlist").kendoDropDownList({
@@ -73,10 +73,10 @@ such as
7373
[JSONP](http://en.wikipedia.org/wiki/JSONP).
7474

7575
### Binding to a remote OData service
76-
76+
7777
<input id="dropdownlist">
78-
79-
<script>
78+
79+
<script>
8080
$(document).ready(function() {
8181
$("#dropdownlist").kendoDropDownList({
8282
index: 0,
@@ -203,3 +203,18 @@ jQuery width() method can be used for changing the widget dimensions.
203203
dropdownlist.list.width(400);
204204
});
205205
</script>
206+
207+
### Set the list dimensions (MVVM)
208+
209+
```html
210+
<input id="ddl" data-role="dropdownlist" data-bind="source: foo" />
211+
212+
<script>
213+
var vm = {
214+
foo: [ "one", "two" ]
215+
}
216+
217+
kendo.bind(document.body, vm);
218+
$("#ddl").data("kendoDropDownList").list.width(400);
219+
</script>
220+
```

0 commit comments

Comments
 (0)