Skip to content

Commit e8d5dfc

Browse files
committed
Document VirtualList properties and templates for AutoComplete, Combo, DropDown and MultiSelect
1 parent 44027e1 commit e8d5dfc

File tree

4 files changed

+144
-0
lines changed

4 files changed

+144
-0
lines changed

api/javascript/ui/autocomplete.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,86 @@ Specifies the [value binding](/framework/mvvm/bindings/value) behavior for the w
388388
kendo.bind($("#autocomplete"), viewModel);
389389
</script>
390390

391+
### virtual `Boolean|Object`*(default: false)*
392+
393+
Enables the virtualization feature of the widget.
394+
395+
#### Example - AutoComplete with virtualized list
396+
397+
<input id="orders" style="width: 400px" />
398+
<script>
399+
$(document).ready(function() {
400+
$("#orders").kendoAutoComplete({
401+
template: "#= OrderID # | For: #= ShipName #, #= ShipCountry #",
402+
dataTextField: "ShipName",
403+
virtual: true,
404+
height: 520,
405+
dataSource: {
406+
type: "odata",
407+
transport: {
408+
read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
409+
},
410+
schema: {
411+
model: {
412+
fields: {
413+
OrderID: { type: "number" },
414+
Freight: { type: "number" },
415+
ShipName: { type: "string" },
416+
OrderDate: { type: "date" },
417+
ShipCity: { type: "string" }
418+
}
419+
}
420+
},
421+
pageSize: 80,
422+
serverPaging: true,
423+
serverFiltering: true
424+
}
425+
});
426+
});
427+
</script>
428+
429+
### virtual.itemHeight `Number`*(default: null)*
430+
431+
Specifies the height of the virtual item. If not specified the framework will automatically calculate the itemHeight based on the theme used.
432+
433+
#### Example - AutoComplete with virtualized list
434+
435+
<input id="orders" style="width: 400px" />
436+
<script>
437+
$(document).ready(function() {
438+
$("#orders").kendoAutoComplete({
439+
template: "#= OrderID # | For: #= ShipName #, #= ShipCountry #",
440+
dataTextField: "ShipName",
441+
virtual: {
442+
itemHeight: 26
443+
},
444+
height: 520,
445+
dataSource: {
446+
type: "odata",
447+
transport: {
448+
read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
449+
},
450+
schema: {
451+
model: {
452+
fields: {
453+
OrderID: { type: "number" },
454+
Freight: { type: "number" },
455+
ShipName: { type: "string" },
456+
OrderDate: { type: "date" },
457+
ShipCity: { type: "string" }
458+
}
459+
}
460+
},
461+
pageSize: 80,
462+
serverPaging: true,
463+
serverFiltering: true
464+
}
465+
});
466+
});
467+
</script>
468+
469+
### virtual.valueMapper `Function`*(default: null)*
470+
391471
## Fields
392472

393473
### dataSource `kendo.data.DataSource`

api/javascript/ui/combobox.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,14 @@ The supported filter values are `startswith`, `endswith` and `contains`.
302302
});
303303
</script>
304304

305+
### fixedGroupTemplate `String|Function`
306+
307+
The [template](/api/framework/kendo#methods-template) used to render the fixed header group. By default the widget displays only the value of the group.
308+
309+
### groupTemplate `String|Function`
310+
311+
The [template](/api/framework/kendo#methods-template) used to render the groups. By default the widget displays only the value of the group.
312+
305313
### height `Number`*(default: 200)*
306314

307315
The height of the suggestion popup in pixels. The default value is 200 pixels.
@@ -522,6 +530,18 @@ Specifies the [value binding](/framework/mvvm/bindings/value) behavior for the w
522530
kendo.bind($("#combobox"), viewModel);
523531
</script>
524532

533+
### virtual `Boolean|Object`*(default: false)*
534+
535+
Enables the virtualization feature of the widget.
536+
537+
### virtual.itemHeight `Number`*(default: null)*
538+
539+
Specifies the height of the virtual item. If not specified the framework will automatically calculate the itemHeight based on the theme used.
540+
541+
### virtual.valueMapper `Function`*(default: null)*
542+
543+
**Required!**
544+
525545
## Fields
526546

527547
### dataSource `kendo.data.DataSource`

api/javascript/ui/dropdownlist.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,14 @@ The supported filter values are `startswith`, `endswith` and `contains`.
303303
});
304304
</script>
305305

306+
### fixedGroupTemplate `String|Function`
307+
308+
The [template](/api/framework/kendo#methods-template) used to render the fixed header group. By default the widget displays only the value of the group.
309+
310+
### groupTemplate `String|Function`
311+
312+
The [template](/api/framework/kendo#methods-template) used to render the groups. By default the widget displays only the value of the group.
313+
306314
### height `Number`*(default: 200)*
307315

308316
The height of the suggestion popup in pixels. The default value is 200 pixels.
@@ -398,6 +406,10 @@ The minimum number of characters the user must type before a filter is performed
398406
});
399407
</script>
400408

409+
### optionLabelTemplate `String|Function`
410+
411+
The [template](/api/framework/kendo#methods-template) used to render the option label.
412+
401413
### headerTemplate `String|Function`
402414

403415
Specifies a static HTML content, which will be rendered as a header of the popup element.
@@ -553,6 +565,18 @@ Specifies the [value binding](/framework/mvvm/bindings/value) behavior for the w
553565
kendo.bind($("#dropdown"), viewModel);
554566
</script>
555567

568+
### virtual `Boolean|Object`*(default: false)*
569+
570+
Enables the virtualization feature of the widget.
571+
572+
### virtual.itemHeight `Number`*(default: null)*
573+
574+
Specifies the height of the virtual item. If not specified the framework will automatically calculate the itemHeight based on the theme used.
575+
576+
### virtual.valueMapper `Function`*(default: null)*
577+
578+
**Required!**
579+
556580
## Fields
557581

558582
### dataSource `kendo.data.DataSource`

api/javascript/ui/multiselect.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,14 @@ The supported filter values are `startswith`, `endswith` and `contains`.
282282
});
283283
</script>
284284

285+
### fixedGroupTemplate `String|Function`
286+
287+
The [template](/api/framework/kendo#methods-template) used to render the fixed header group. By default the widget displays only the value of the group.
288+
289+
### groupTemplate `String|Function`
290+
291+
The [template](/api/framework/kendo#methods-template) used to render the groups. By default the widget displays only the value of the group.
292+
285293
### height `Number`*(default: 200)*
286294

287295
The height of the suggestion popup in pixels. The default value is 200 pixels.
@@ -548,6 +556,18 @@ Specifies the [value binding](/framework/mvvm/bindings/value) behavior for the w
548556
kendo.bind($("#multiselect"), viewModel);
549557
</script>
550558

559+
### virtual `Boolean|Object`*(default: false)*
560+
561+
Enables the virtualization feature of the widget.
562+
563+
### virtual.itemHeight `Number`*(default: null)*
564+
565+
Specifies the height of the virtual item. If not specified the framework will automatically calculate the itemHeight based on the theme used.
566+
567+
### virtual.valueMapper `Function`*(default: null)*
568+
569+
**Required!**
570+
551571
## Fields
552572

553573
### dataSource `kendo.data.DataSource`

0 commit comments

Comments
 (0)