Skip to content

Commit 23826b2

Browse files
author
User Jenkins
committed
Sync with Kendo UI Professional
1 parent 8a33d7b commit 23826b2

28 files changed

+692
-186
lines changed

docs-aspnet/html-helpers/layout/window/loading-content.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,25 @@ To configure the Window with load-on-demand content:
4949
.LoadContentFrom("AjaxContent", "Window") //Define the Action and Controller names.
5050
)
5151

52+
You can also use another [`.LoadContentFrom()`](/api/Kendo.Mvc.UI.Fluent/WindowBuilder#loadcontentfrommicrosoftaspnetcoreroutingroutevaluedictionary) overload to pass additional details to the action method returning the Window's content:
53+
```Razor
54+
@(Html.Kendo().Window()
55+
.Name("window")
56+
.Title("User Details")
57+
.LoadContentFrom("UserDetails", "Window", new { userId = 10}) //Define the Action, Controller names and additional route values.
58+
)
59+
```
60+
```Controller
61+
public IActionResult UserDetails(int userId)
62+
{
63+
MyUserViewModel model = myService.GetUserDetails(userId)
64+
//fetch required details and pass them to the View
65+
66+
return View(model);
67+
}
68+
```
69+
70+
To refresh or change the Window's content on the client, once the Window has been initialized, you can use the [Client-side API of the Window](https://docs.telerik.com/kendo-ui/api/javascript/ui/window) and the [refresh method](https://docs.telerik.com/kendo-ui/api/javascript/ui/window/methods/refresh).
5271
## See Also
5372

5473
* [Server-Side API](/api/window)

docs-aspnet/knowledge-base/grid-bind-a-dropdownlist-editor.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ component: grid
1919
</tr>
2020
<tr>
2121
<td>Product Version</td>
22-
<td>217.2.621</td>
22+
<td>2017.2.621</td>
2323
</tr>
2424
</table>
2525

@@ -33,7 +33,7 @@ This is a logged issue. The Core helpers duplicate the property name when the `D
3333

3434
## Suggested Workarounds
3535

36-
Telerik UI for ASP.NET Core does not provide a built-in solution for achieving this behavior. However, you can still work around the issue by using a `.DropDownListFor(m => m)` definition.
36+
Telerik UI for ASP.NET Core does not provide a built-in solution for achieving this behavior. However, you can still work around the issue by using a `.DropDownListFor(m => m)` definition when defining an Editor Template.
3737

3838
```
3939
@model Project.Models.StateProvinceRegionViewModel
@@ -47,6 +47,7 @@ Telerik UI for ASP.NET Core does not provide a built-in solution for achieving t
4747
)
4848
```
4949

50+
For further details on configuring Custom Editors for the Grid refer to the [Custom Editing](https://docs.telerik.com/aspnet-core/html-helpers/data-management/grid/editing/custom#custom-editing) section of the documentation and the [runnable example demonstrating the use of a DropDownList as a Custom Editor](https://demos.telerik.com/aspnet-core/grid/editing-custom)
5051
## See Also
5152

5253
* [API Reference of the Grid](https://docs.telerik.com/kendo-ui/api/javascript/ui/grid)

docs/api/javascript/data/model.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,32 @@ res_type: api
1616

1717
The value of the ID of the `Model`. This field is available only if the `id` is defined in the Model configuration. See the following example.
1818

19+
#### Example
20+
21+
<script>
22+
var crudServiceBaseUrl = "https://demos.telerik.com/kendo-ui/service",
23+
dataSource = new kendo.data.DataSource({
24+
transport: {
25+
read: {
26+
url: crudServiceBaseUrl + "/Products",
27+
dataType: "jsonp"
28+
}
29+
},
30+
pageSize: 20,
31+
schema: {
32+
model: {
33+
id: "ProductID",
34+
fields: {
35+
ProductID: { editable: false, nullable: true },
36+
ProductName: { validation: { required: true } },
37+
UnitPrice: { type: "number" },
38+
Discontinued: { type: "boolean" },
39+
}
40+
}
41+
}
42+
});
43+
</script>
44+
1945
### idField `String`
2046

2147
The name of the `Model` ID field. This field is available only if the `id` is defined in the Model configuration.

docs/api/javascript/dataviz/ui/chart.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -838,6 +838,20 @@ that the total number of categories does not exceed [categoryAxis.maxDateGroups]
838838

839839
This option is ignored if [categoryAxis.baseUnit](/api/javascript/dataviz/ui/chart#configuration-categoryAxis.baseUnit) is set to "fit".
840840

841+
<div id="chart"></div>
842+
<script>
843+
$("#chart").kendoChart({
844+
categoryAxis: {
845+
categories: [
846+
new Date("2012/02/01 00:00:00"),
847+
new Date("2012/02/02 00:00:00"),
848+
new Date("2012/02/20 00:00:00")
849+
],
850+
baseUnitStep: "3" // Displays a category for every 3 days.
851+
}
852+
});
853+
</script>
854+
841855
### categoryAxis.categories `Array`
842856

843857
The category names. The chart will create a category for every item of the array.
@@ -6149,7 +6163,7 @@ The supported values are:
61496163

61506164
* "date" - specialized axis for displaying chronological data.
61516165

6152-
#### Example - set the category axis type
6166+
#### Example - set the category axis type to date
61536167

61546168
<div id="chart"></div>
61556169
<script>
@@ -6167,6 +6181,25 @@ The supported values are:
61676181
});
61686182
</script>
61696183

6184+
#### Example - set the category axis type to category
6185+
6186+
<div id="chart"></div>
6187+
<script>
6188+
$("#chart").kendoChart({
6189+
categoryAxis: {
6190+
categories: [
6191+
"Seats",
6192+
"Cars",
6193+
"People"
6194+
],
6195+
type: "category"
6196+
},
6197+
series: [
6198+
{ data: [1, 2, 3] }
6199+
]
6200+
});
6201+
</script>
6202+
61706203
### categoryAxis.visible `Boolean` *(default: true)*
61716204

61726205
If set to `true` the chart will display the category axis. By default the category axis is visible.
@@ -39099,16 +39132,18 @@ The data point value.
3909939132

3910039133
#### Example - subscribe to the "seriesHover" event after initialization
3910139134
<div id="chart"></div>
39102-
functino chart_seriesHover(e) {
39103-
/* The result can be observed in the DevTools(F12) console of the browser. */
39104-
console.log(e.value);
39105-
}
3910639135
<script>
3910739136
$("#chart").kendoChart({
3910839137
series: [
3910939138
{ data: [1, 2] }
3911039139
]
3911139140
});
39141+
39142+
function chart_seriesHover(e) {
39143+
/* The result can be observed in the DevTools(F12) console of the browser. */
39144+
console.log(e.value);
39145+
}
39146+
3911239147
var chart = $("#chart").data("kendoChart");
3911339148
chart.bind("seriesHover", chart_seriesHover);
3911439149
</script>

docs/api/javascript/dataviz/ui/sparkline.md

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3621,30 +3621,33 @@ Template variables:
36213621

36223622
#### Example
36233623

3624-
$("#chart").kendoChart({
3625-
title: {
3626-
text: "Internet Users"
3627-
},
3628-
series: [{
3629-
name: "United States",
3630-
data: [67.96, 68.93, 75, 74, 78]
3631-
}, {
3632-
name: "World",
3633-
data: [15.7, 16.7, 20, 23.5, 26.6]
3634-
}],
3635-
categoryAxis: {
3636-
categories: [2005, 2006, 2007, 2008, 2009]
3637-
},
3638-
tooltip: {
3639-
visible: true,
3640-
shared: true,
3641-
sharedTemplate:
3642-
"#= category # </br>" +
3643-
"# for (var i = 0; i < points.length; i++) { #" +
3644-
"#= points[i].series.name #: #= points[i].value # </br>" +
3645-
"# } #"
3646-
}
3624+
<div id="sparkline"></div>
3625+
3626+
<script>
3627+
$("#sparkline").kendoSparkline({
3628+
chartArea: {
3629+
width: 300,
3630+
height: 200
3631+
},
3632+
type: "bar",
3633+
categoryAxis: {
3634+
categories: [2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014]
3635+
},
3636+
seriesDefaults: {
3637+
data: [
3638+
16, 17, 18, 19, 20, 21, 21, 22, 23, 22
3639+
],
3640+
name: "value"
3641+
},
3642+
tooltip: {
3643+
shared: true,
3644+
sharedTemplate: "#= category # </br>" +
3645+
"# for (var i = 0; i < points.length; i++) { #" +
3646+
"#= points[i].series.name #: #= points[i].value # </br>" +
3647+
"# } #"
3648+
}
36473649
});
3650+
</script>
36483651

36493652
### transitions `Boolean`*(default: false)*
36503653

docs/api/javascript/ui/button.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,17 @@ Specifies the color of the component. Valid options are `inherit`, `default`, `p
9696

9797
If set to false the badge will not be displayed.
9898

99+
#### Example
100+
101+
<button id="button">Button</button>
102+
<script>
103+
$("#button").kendoButton({
104+
badge: {
105+
text: 21,
106+
visible: false
107+
}
108+
});
109+
</script>
99110

100111
### enable `Boolean` *(default: true)*
101112

docs/api/javascript/ui/dropdownlist.md

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -924,31 +924,56 @@ The value of the widget.
924924

925925
### valuePrimitive `Boolean`*(default: false)*
926926

927-
Specifies the [value binding](/framework/mvvm/bindings/value) behavior for the widget when the initial model value is null. If set to true, the View-Model field will be updated with the selected item value field. If set to false, the View-Model field will be updated with the selected item.
927+
Specifies the [value binding](/framework/mvvm/bindings/value) behavior for the widget when the initial model value is null. If set to `true`, the View-Model field will be updated with the primitive value of the selected item's field (defined in the dataValueField option).if set to `false`, the View-Model field will be updated with the selected item - the entire non-primitive object.
928928

929-
#### Example - specify that the View-Model field should be updated with the selected item value
930929

931-
<select id="dropdown" data-bind="value: selectedProductId, source: products" >
932-
</select>
930+
#### Example - specify that the View-Model field should be updated with the selected item value
933931

932+
<div id="example">
933+
<div>Change the value of the dropdowns and observe the logged value in the console.</div>
934+
<br/>
935+
936+
<select id="dropdownPrimitive" data-bind="value: selectedProductId, source: products" >
937+
</select>
938+
939+
<select id="dropdown" data-bind="value: selectedProduct, source: products" >
940+
</select>
941+
</div>
934942
<script>
935-
$("#dropdown").kendoDropDownList({
943+
$("#dropdownPrimitive").kendoDropDownList({
936944
valuePrimitive: true,
937945
dataTextField: "name",
938946
dataValueField: "id",
939947
optionLabel: "Select product..."
940948
});
949+
950+
$("#dropdown").kendoDropDownList({
951+
valuePrimitive: false,
952+
dataTextField: "name",
953+
dataValueField: "id",
954+
optionLabel: "Select product..."
955+
});
956+
941957
var viewModel = kendo.observable({
942958
selectedProductId: null,
959+
selectedProduct: null,
943960
products: [
944961
{ id: 1, name: "Coffee" },
945962
{ id: 2, name: "Tea" },
946963
{ id: 3, name: "Juice" }
947964
]
948965
});
966+
967+
viewModel.bind("change", function(ev) {
968+
if (ev.field === "selectedProduct") {
969+
console.log("value: " + JSON.stringify(this.get(ev.field)));
970+
} else if (ev.field === "selectedProductId") {
971+
console.log("value: " + this.get(ev.field));
972+
}
973+
});
949974

950-
kendo.bind($("#dropdown"), viewModel);
951-
</script>
975+
kendo.bind($("#example"), viewModel);
976+
952977

953978
### virtual `Boolean|Object`*(default: false)*
954979

docs/api/javascript/ui/filemanager.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,6 +1443,49 @@ The source which triggered the event.
14431443

14441444
Fired when the widget is bound to data from its data source.
14451445

1446+
#### Example
1447+
1448+
<div id="filemanager"></div>
1449+
<script>
1450+
var baseUrl = "https://demos.telerik.com/kendo-ui/service/filemanager/";
1451+
1452+
$("#filemanager").kendoFileManager({
1453+
dataSource: {
1454+
schema: kendo.data.schemas.filemanager,
1455+
transport: {
1456+
read: {
1457+
url: baseUrl + "Read",
1458+
method: "POST"
1459+
},
1460+
create: {
1461+
url: baseUrl + "Create",
1462+
method: "POST"
1463+
},
1464+
update: {
1465+
url: baseUrl + "Update",
1466+
method: "POST"
1467+
},
1468+
destroy: {
1469+
url: baseUrl + "Destroy",
1470+
method: "POST"
1471+
}
1472+
}
1473+
},
1474+
uploadUrl: "/kendo-ui/service/FileManager/Upload",
1475+
toolbar: {
1476+
items: [
1477+
{ name: "createFolder" },
1478+
{ name: "upload" }
1479+
]
1480+
},
1481+
dataBound: onDataBound
1482+
});
1483+
1484+
function onDataBound(e) {
1485+
console.log("event: DataBound");
1486+
}
1487+
</script>
1488+
14461489
#### Event Data
14471490

14481491
##### e.sender `kendo.ui.FileManager`

0 commit comments

Comments
 (0)