Skip to content

Commit aba95c0

Browse files
author
User Jenkins
committed
Sync with Kendo UI Professional
1 parent 03aefa4 commit aba95c0

File tree

30 files changed

+6187
-5219
lines changed

30 files changed

+6187
-5219
lines changed

docs/api/javascript/data/datasource.md

Lines changed: 5130 additions & 5117 deletions
Large diffs are not rendered by default.

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

Lines changed: 336 additions & 1 deletion
Large diffs are not rendered by default.

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,10 @@ The maximum number of groups (categories) to display when
496496
[categoryAxis.baseUnit](/api/javascript/dataviz/ui/stock-chart#configuration-categoryAxis.baseUnit) is set to "fit" or
497497
[categoryAxis.baseUnitStep](/api/javascript/dataviz/ui/stock-chart#configuration-categoryAxis.baseUnitStep) is set to "auto".
498498

499+
### navigator.categoryAxis.maxDivisions `Number`
500+
501+
The maximum number of ticks and labels to display.
502+
499503
### navigator.categoryAxis.min `Object`
500504

501505
The first date displayed on the category date axis. By default, the minimum date is the same as the first category.

docs/api/javascript/ui/grid.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7964,7 +7964,10 @@ the [Column widths](/web/grid/appearance#column-widths) help section for additio
79647964

79657965
The [template](/api/javascript/kendo/methods/template) which renders rows. Be default renders a table row (`<tr>`) for every data source item.
79667966

7967-
> The outermost HTML element in the template must be a table row (`<tr>`). That table row must have the `uid` data attribute set to `#= uid #`. The grid uses the `uid` data attribute to determine the data to which a table row is bound to.
7967+
> There are a few important things to keep in mind when using `rowTemplate`.
7968+
>
7969+
>* The outermost HTML element in the template must be a table row (`<tr>`). That table row must have the `uid` data attribute set to `#= uid #`. The grid uses the `uid` data attribute to determine the data to which a table row is bound to.
7970+
>* If `rowTemplate` is used alongside with `detailTemplate`, the row (`<tr>`) element needs to have class `k-master-row`. The first `<td>` element of the row needs to have class `k-hierarchy-cell`. Check the [`Row Templates documentation`](/controls/data-management/grid/Templates/row-templates) for more information.
79687971
79697972
#### Example - specify row template as a function
79707973

@@ -8328,7 +8331,7 @@ The "search" built-in search panel for the grid.
83288331
<div id="grid"></div>
83298332
<script>
83308333
$("#grid").kendoGrid({
8331-
toolbar: "<p>My string template in a paragraph.</p>",
8334+
toolbar: "<button class='k-button' onclick='myClick()'>My Button</button>",
83328335
columns: [
83338336
{ field: "name" },
83348337
{ field: "age" }
@@ -8344,14 +8347,22 @@ The "search" built-in search panel for the grid.
83448347
},
83458348
editable: true
83468349
});
8350+
8351+
function myClick() {
8352+
kendo.alert("Clicked!")
8353+
}
83478354
</script>
83488355

83498356
#### Example - configure the Grid Toolbar template with a function
83508357

8358+
<script type="x-kendo/template" id="template">
8359+
<button class='k-button' onclick='myClick()'>My Button</button>
8360+
</script>
8361+
83518362
<div id="grid"></div>
83528363
<script>
83538364
$("#grid").kendoGrid({
8354-
toolbar: kendo.template("<p>My function template.</p>"),
8365+
toolbar: kendo.template($("#template").html()),
83558366
columns: [
83568367
{ field: "name" },
83578368
{ field: "age" }
@@ -8367,6 +8378,10 @@ The "search" built-in search panel for the grid.
83678378
},
83688379
editable: true
83698380
});
8381+
8382+
function myClick() {
8383+
kendo.alert("Clicked!")
8384+
}
83708385
</script>
83718386

83728387
#### Example - configure the Grid Toolbar as an array of commands
@@ -10078,7 +10093,10 @@ A string, DOM element or jQuery object which represents the table row(s) or cell
1007810093

1007910094
Gets an array that holds the id field values of the selected rows.
1008010095

10081-
> **Note:** In order for the method to return the selected IDs you need to define an ID field in [`schema.model`](/api/javascript/data/datasource/configuration/schema.model).
10096+
> There are a few important things to keep in mind when using `selectedKeyNames`.
10097+
>
10098+
> * **In order for the method to return the selected IDs you need to define an ID field in [`schema.model`](/api/javascript/data/datasource/configuration/schema.model).**
10099+
> * **The selected IDs are sorted in ascending order inside the `selectedKeyNames` array.**
1008210100
1008310101

1008410102
#### Returns

docs/api/javascript/ui/listbox.md

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,28 @@ The built-in tools are:
700700

701701
## Methods
702702

703+
### add
704+
705+
Adds an item to the widget.
706+
707+
#### Example
708+
709+
<select id="listBox"></select>
710+
<script>
711+
$("#listBox").kendoListBox({
712+
dataSource: {
713+
data: [
714+
{ name: "Jane Doe" },
715+
{ name: "Sam Doe" }
716+
]
717+
},
718+
template: "<div>#:name#</div>"
719+
});
720+
var listBox = $("#listBox").data("kendoListBox");
721+
var person = {name: "Bob Doe"};
722+
listBox.add(person);
723+
</script>
724+
703725
### clearSelection
704726

705727
Clears the selected items of the ListBox and triggers the `change` event.
@@ -1287,6 +1309,9 @@ The data items that are to be removed.
12871309
<script>
12881310
$("#listBox").kendoListBox({
12891311
template: "<div>#: name#</div>",
1312+
toolbar: {
1313+
tools: ["remove"]
1314+
},
12901315
dataSource: {
12911316
data: [
12921317
{ id: 1, name: "Jane Doe" },
@@ -1304,11 +1329,9 @@ The data items that are to be removed.
13041329
},
13051330
remove: function(e) {
13061331
//handle event
1332+
alert(e.dataItems[0].name + " was removed from the list");
13071333
}
13081334
});
1309-
// get a reference to the list box
1310-
var listBox = $("#listBox").data("kendoListBox");
1311-
listBox.remove(listBox.items().first());
13121335
</script>
13131336

13141337
#### To set after initialization
@@ -1317,6 +1340,9 @@ The data items that are to be removed.
13171340
<script>
13181341
$("#listBox").kendoListBox({
13191342
template: "<div>#: name#</div>",
1343+
toolbar: {
1344+
tools: ["remove"]
1345+
},
13201346
dataSource: {
13211347
data: [
13221348
{ id: 1, name: "Jane Doe" },
@@ -1337,12 +1363,9 @@ The data items that are to be removed.
13371363
var listBox = $("#listBox").data("kendoListBox");
13381364
// bind to the remove event
13391365
listBox.bind("remove", function(e) {
1340-
// handle event
1341-
/* The result can be observed in the DevTools(F12) console of the browser. */
1342-
console.log("remove");
1343-
e.preventDefault();
1366+
// handle event
1367+
alert(e.dataItems[0].name + " was removed from the list");
13441368
});
1345-
listBox.remove(listBox.items().first());
13461369
</script>
13471370

13481371
### reorder

docs/api/javascript/ui/listview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,8 @@ Multiple item selection.
715715

716716
Specifies ListView item template.
717717

718+
> The outermost HTML element in the template must be enclosed in another container such as a `div` or `span` element.
719+
718720
#### Example
719721

720722
<script type="text/kendo-x-tmpl" id="template">
@@ -740,6 +742,8 @@ Specifies ListView item template.
740742

741743
Template to be used for rendering the alternate items in the ListView.
742744

745+
> The outermost HTML element in the template must be enclosed in another container such as a `div` or `span` element.
746+
743747
#### Example of alternate item template
744748

745749

docs/api/javascript/ui/pivotgrid.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,15 +1083,17 @@ The fields which can be used in the template are:
10831083
For information about the tuple structure check this [link](/api/javascript/data/pivotdatasource/configuration/schema.axes).
10841084
About the data item structure review this [help topic](/api/javascript/data/pivotdatasource/configuration/schema.data).
10851085

1086-
#### Example - emphasize the values in *2005*
1086+
#### Example - bold the value for the *2010* column and use the formatted value for the other columns.
10871087

10881088
<div id="pivotgrid"></div>
10891089

10901090
<script id="dataCellTemplate" type="text/x-kendo-template">
1091-
# if (columnTuple.members[0].name === "[Date].[Calendar].[Year].&[2005]") { #
1092-
<em>#: kendo.toString(kendo.parseFloat(dataItem.value), "c2") #</em>
1091+
# if (columnTuple.members[0].name === "[Date].[Calendar].[Calendar Year].&[2010]") { #
1092+
<!-- Display the value in bold for the year 2010. -->
1093+
<b>#: dataItem.value #</b>
10931094
# } else { #
1094-
#: kendo.toString(kendo.parseFloat(dataItem.value), "c2") #
1095+
<!-- Display the formatted value for the other years. -->
1096+
#: dataItem.fmtValue #
10951097
# } #
10961098
</script>
10971099

docs/api/javascript/ui/treelist.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,6 +1066,41 @@ populated at the time the template function is called, if the TreeList uses remo
10661066
});
10671067
</script>
10681068

1069+
### columns.filterable.operators `Object`
1070+
1071+
The property is identical to [`filterable.operators`](filterable.operators), but is used for a specific column.
1072+
1073+
#### Example - Set custom filterable operators
1074+
1075+
<div id="treelist"></div>
1076+
<script>
1077+
$("#treelist").kendoTreeList({
1078+
columns: [
1079+
{
1080+
field: "name",
1081+
filterable:{
1082+
operators:{
1083+
string:{
1084+
eq: "custom equal",
1085+
neq: "custom not equal"
1086+
}
1087+
}
1088+
}
1089+
},
1090+
{ field: "age" }
1091+
],
1092+
dataSource: {
1093+
data: [
1094+
{ parentId: null, id: 1, name: "Jane Doe", age: 30 },
1095+
{ parentId: 1, id: 2, name: "John Doe", age: 33 }
1096+
]
1097+
},
1098+
filterable: {
1099+
extra: false
1100+
}
1101+
});
1102+
</script>
1103+
10691104
### columns.filterable.ui `String|Function`
10701105

10711106
The `role` [data attribute](/framework/data-attribute-initialization) of the widget that is used in the filter menu, or a JavaScript function which initializes that widget.

docs/controls/charts/appearance.md

Lines changed: 50 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,51 +19,64 @@ The Charts come with [a set of predefined themes]({% slug themesandappearnce_ken
1919

2020
> As of the Kendo UI R2 2015 (2015.2.624) release, [all CSS code related to the rendering of data visualization widgets (Gauges, Charts, Barcodes, Diagrams, and Maps) is now moved to the CSS files of the widgets]({% slug breakingchanges2015_kendoui %}). As a result, you need to remove all legacy references to `kendo.dataviz.css` and `kendo.dataviz.[theme].css`.
2121
22-
$("#chart").kendoChart({
23-
theme: "blueOpal",
24-
series: [{
25-
type: "bar",
26-
name: "United States",
27-
data: [67.96, 68.93, 75, 74, 78]
28-
}],
29-
categoryAxis: {
30-
categories: [2005, 2006, 2007, 2008, 2009]
31-
}
32-
});
33-
22+
```dojo
23+
<div id="chart"></div>
24+
<script>
25+
$("#chart").kendoChart({
26+
theme: "blueOpal",
27+
series: [{
28+
type: "bar",
29+
name: "United States",
30+
data: [67.96, 68.93, 75, 74, 78]
31+
}],
32+
categoryAxis: {
33+
categories: [2005, 2006, 2007, 2008, 2009]
34+
}
35+
});
36+
</script>
37+
```
3438

3539
## Sass Themes
3640

37-
As of the R2 2017 SP1 release, the Chart provides styling options through [Sass-based themes]({% slug sassbasedthemes_kendoui %}). When the theme is set to `inherit`, the Chart reads colors and fonts from the theme variables.
38-
39-
$("#chart").kendoChart({
40-
theme: "inherit",
41-
series: [{
42-
type: "bar",
43-
name: "United States",
44-
data: [67.96, 68.93, 75, 74, 78]
45-
}],
46-
categoryAxis: {
47-
categories: [2005, 2006, 2007, 2008, 2009]
48-
}
49-
});
50-
41+
As of the R2 2017 SP1 release, the Chart provides styling options through [Sass-based themes]({% slug sassbasedthemes_kendoui %}). When the theme is set to `sass`, the Chart reads colors and fonts from the theme variables.
42+
43+
```dojo
44+
<div id="chart"></div>
45+
<script>
46+
$("#chart").kendoChart({
47+
theme: "sass",
48+
series: [{
49+
type: "bar",
50+
name: "United States",
51+
data: [67.96, 68.93, 75, 74, 78]
52+
}],
53+
categoryAxis: {
54+
categories: [2005, 2006, 2007, 2008, 2009]
55+
}
56+
});
57+
</script>
58+
```
5159

5260
## Animated Transitions
5361

5462
Kendo UI Charts use animated transitions to display new and updated data. To disable these transitions, use the `transitions` option.
5563

56-
$("#chart").kendoChart({
57-
series: [{
58-
type: "bar",
59-
name: "United States",
60-
data: [67.96, 68.93, 75, 74, 78]
61-
}],
62-
categoryAxis: {
63-
categories: [2005, 2006, 2007, 2008, 2009]
64-
},
65-
transitions: false
66-
});
64+
```dojo
65+
<div id="chart"></div>
66+
<script>
67+
$("#chart").kendoChart({
68+
series: [{
69+
type: "bar",
70+
name: "United States",
71+
data: [67.96, 68.93, 75, 74, 78]
72+
}],
73+
categoryAxis: {
74+
categories: [2005, 2006, 2007, 2008, 2009]
75+
},
76+
transitions: false
77+
});
78+
</script>
79+
```
6780

6881
## See Also
6982

docs/controls/charts/sparkline/overview.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ The Kendo UI Sparkline is a very small chart that is drawn without axes, coordin
1212

1313
Sparklines behave like inline elements as they are rendered inside a `span` element so that they can be easily embedded in text as opposed to the standard Telerik UI Charts which behave like block elements as they are rendered inside `div` elements.
1414

15+
> * The Sparkline inherits configurations, methods, fields and events from the [Categorical Charts]({% slug htmlhelpers_categoricalcharts_aspnetcore %}).
16+
1517
While Sparklines are typically line charts, other types are supported as well:
1618

1719
* Line (default)

0 commit comments

Comments
 (0)