Skip to content

Commit 4bfef4f

Browse files
committed
Sync with Kendo UI Professional
1 parent 59c06f3 commit 4bfef4f

File tree

4 files changed

+35
-7
lines changed

4 files changed

+35
-7
lines changed

docs-aspnet/html-helpers/editors/dropdowntree/binding/server-binding.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,27 @@ You can bind the DropDownTree locally on the server by passing the appropriate c
8888
```
8989
{% endif %}
9090

91+
## Mapping Objects to DropDownTreeItemModels
92+
93+
When using server binding you can map a collection of object to a collection of DropDownTreeItemModel, expected by the DropDownTree, via the [BindTo overload](/api/kendo.mvc.ui.fluent/dropdowntreebuilder#bindtosystemcollectionsienumerablesystemaction). By default, the items will be serialized with the default JSON configuation of the [DropDownTree items]({% slug htmlhelpers_dropdowntree_items_aspnetcore %}). If an initial value is set or the `DropDownTreeFor(m=>m)` overload is used and the DataTextField and DataValueField of the mapped objects are different thatn the default `text` and `value` fields, set the DataTextField and DataValueField configuration options, to ensure proper model binding.
94+
95+
```HtmlHelper
96+
@(Html.Kendo().DropDownTreeFor(m => m.SelectedOptions)
97+
.Checkboxes(true)
98+
.DataTextField("OptionName")
99+
.DataValueField("OptionValue")
100+
.AutoBind(true)
101+
.BindTo((IEnumerable<Options>)ViewBag.DropDownTreeData, (NavigationBindingFactory<DropDownTreeItem> mappings) =>
102+
{
103+
mappings.For<Options>(binding => binding.ItemDataBound((item, option) =>
104+
{
105+
item.Text = option.OptionName;
106+
item.Value = option.OptionValue;
107+
}));
108+
})
109+
)
110+
111+
```
91112

92113
## See Also
93114

docs-aspnet/knowledge-base/detail-grid-export.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,13 @@ Refer to the [following REPL](https://netcorerepl.telerik.com/QwOFwYbU29KigMrU43
146146
// insert the detail sheet rows after the master row
147147
[].splice.apply(workbook.sheets[0].rows, [masterRowIndex + 1, 0].concat(sheet.rows));
148148
}
149-
// save the workbook
150-
kendo.saveAs({
151-
dataURI: new kendo.ooxml.Workbook(workbook).toDataURL(),
149+
150+
// Save the workbook.
151+
new kendo.ooxml.Workbook(workbook).toDataURLAsync().then(function(data) {
152+
kendo.saveAs($.extend({
153+
dataURI: data,
152154
fileName: "Export.xlsx"
155+
}));
153156
});
154157
});
155158
}

docs/api/javascript/ui/timepicker.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@ The duration of the open animation in milliseconds.
162162

163163
Specifies a list of dates, which are shown in the time drop-down list. If not set, the TimePicker will auto-generate the available times.
164164

165+
> This configuration works only with the [`classic component type`](/api/javascript/ui/timepicker/configuration/componenttype).
166+
165167

166168
#### Example
167169

docs/knowledge-base/detail-grid-export.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,12 @@ The following example demonstrates how to export a detail Grid to Excel includin
306306
}
307307
308308
// Save the workbook.
309-
kendo.saveAs({
310-
dataURI: new kendo.ooxml.Workbook(workbook).toDataURL(),
311-
fileName: "Export.xlsx"
312-
})
309+
new kendo.ooxml.Workbook(workbook).toDataURLAsync().then(function(data) {
310+
kendo.saveAs($.extend({
311+
dataURI: data,
312+
fileName: "Export.xlsx"
313+
}));
314+
});
313315
});
314316
},
315317
columns: [

0 commit comments

Comments
 (0)