Skip to content

Commit 57047fb

Browse files
author
User Jenkins
committed
Sync with Kendo UI Professional
1 parent 318bbfa commit 57047fb

File tree

11 files changed

+188
-14
lines changed

11 files changed

+188
-14
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ The font style of the labels.
293293

294294
### scale.labels.format `String`
295295

296-
The format of the labels.
296+
The [`format`](/globalization/intl/numberformatting) of the labels.
297297

298298
#### Example
299299

docs/api/javascript/ui/filemanager.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,26 @@ The options of the command.
14111411

14121412
Fired when a error in the DataSource happen.
14131413

1414+
#### Example
1415+
1416+
<div id="filemanager"></div>
1417+
<script>
1418+
$("#filemanager").kendoFileManager({
1419+
dataSource: {
1420+
schema: kendo.data.schemas.filemanager,
1421+
transport: {
1422+
read: {
1423+
url: "https://demos.telerik.com/kendo-ui/service/FileManager/Read",
1424+
method: "POST"
1425+
}
1426+
}
1427+
},
1428+
error: function(e) {
1429+
console.log("Request failed with status " + e.status)
1430+
}
1431+
});
1432+
</script>
1433+
14141434
### dataBinding
14151435

14161436
Fired before the widget binds to its data source.

docs/api/javascript/ui/treelist.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5285,6 +5285,27 @@ Configures the Kendo UI TreeList search bar settings.
52855285

52865286
Defines a list of fields which will be included in the search. If values for the property are not defined the treelist will search in all column fields.
52875287

5288+
#### Example - specify which fields will be included in the search
5289+
5290+
<div id="treeList"></div>
5291+
<script>
5292+
$("#treeList").kendoTreeList({
5293+
columns: [
5294+
{ field: "name" },
5295+
{ field: "age" }
5296+
],
5297+
toolbar:["search"],
5298+
search: {
5299+
fields: ["name"] // Or, specify multiple fields by adding them to the array, e.g ["name", "age"]
5300+
},
5301+
dataSource: [
5302+
{ id: 1, parentId: null, name: "Jane Doe", age: 22 },
5303+
{ id: 2, parentId: 1, name: "John Doe", age: 24 },
5304+
{ id: 3, parentId: 1, name: "Jenny Doe", age: 3 }
5305+
]
5306+
});
5307+
</script>
5308+
52885309
### selectable `Boolean|String` *(default: false)*
52895310

52905311
If set to `true`, the user will be able to select TreeList rows. By default, selection is disabled.

docs/api/javascript/ui/treeview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,6 +1490,7 @@ The node whose the checkbox has been checked.
14901490
check: function(e) {
14911491
/* The result can be observed in the DevTools(F12) console of the browser. */
14921492
console.log("Checking", e.node);
1493+
console.log("Is node checked -> " + $(e.node).attr("aria-checked"))
14931494
}
14941495
});
14951496
</script>

docs/controls/data-management/grid/Templates/row-templates.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ A few requirements need to be met when the `rowTemplate` is used alongside a `de
5353
1. The first `<td>` element of the `rowTemplate` needs to have a class `k-hierarchy-cell`.
5454
1. The element with class `k-hierarchy-cell` needs to contain an `a` element which will expand the row.
5555

56+
**Define the `rowTemplate` as an external template.**
57+
5658
```dojo
5759
<script id="template" type="text/x-kendo-template">
5860
<tr class="k-master-row" data-uid="#= uid #">
@@ -93,6 +95,38 @@ A few requirements need to be met when the `rowTemplate` is used alongside a `de
9395
</script>
9496
```
9597

98+
**Define the `rowTemplate` as a function.**
99+
100+
```dojo
101+
<script id="detail-template" type="text/x-kendo-template">
102+
<div>
103+
Name: #: name #
104+
</div>
105+
<div>
106+
Age: #: age #
107+
</div>
108+
</script>
109+
<div id="grid"></div>
110+
<script>
111+
$("#grid").kendoGrid({
112+
columns: [
113+
{ field: "name" },
114+
{ field: "age" }
115+
],
116+
dataSource: [
117+
{ name: "Jane Doe", age: 30 },
118+
{ name: "John Doe", age: 33 }
119+
],
120+
detailTemplate: kendo.template($("#detail-template").html()),
121+
rowTemplate: rowTemplate
122+
});
123+
124+
function rowTemplate(data) {
125+
return '<tr class="k-master-row" data-uid="' + data.uid + '"><td class="k-hierarchy-cell"><a class="k-icon k-i-expand" href="\#" aria-label="Expand"></a></td><td><strong>' + data.name + '</strong></td><td><strong>' + data.age + '</strong></td></tr>';
126+
}
127+
</script>
128+
```
129+
96130
## KB Articles on Row Templates
97131

98132
* [Adding Row Numbers]({% slug howto_addrownumbers_grid %})

docs/controls/editors/multiselect/grouping.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ To enable grouping, use the remote `transport` configuration and a grouped DataS
4444

4545
## Customizing the Inline Group Title
4646

47-
To customize the inline group title which is displayed next to the suggestion item in the popup element, use the [`groupTemplate`](https://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect/configuration/grouptemplate) configuration. The inline group title is rendered as an absolutely positioned, right-aligned group element and is displayed in every first element of each new group. The parameter that is passed to the template is the group title value.
47+
To customize the inline group title which is displayed next to the suggestion item in the popup element, use the [`groupTemplate`](https://docs.telerik.com/kendo-ui/api/javascript/ui/multiselect/configuration/grouptemplate) configuration. The inline group title is rendered as an absolutely positioned, right-aligned group element and is displayed in every first element of each new group. The parameter that is passed to the template is the group title value.
48+
By design, the `groupTemplate` is not displayed for the first group as group hint is shown instead.
4849

4950
The following example demonstrates how to define a custom group template.
5051

docs/controls/editors/numerictextbox/formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ position: 2
88

99
# Formats
1010

11-
The NumericTextBox accepts only numeric entries and its specific format defines the conversion data type&mdash;for example, currency or percentage.
11+
The NumericTextBox accepts only numeric entries and its specific [`format`](/globalization/intl/numberformatting) defines the conversion data type&mdash;for example, currency or percentage.
1212

1313
The following example demonstrates how to render a currency NumericTextBox.
1414

docs/controls/editors/switch/checked.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,22 @@ The following example demonstrates how to initialize a checked Switch by using t
2727
checked: true
2828
});
2929
</script>
30+
31+
The following example demonstrates how to get or set the Switch checked state.
32+
33+
<input id="switch" />
34+
35+
<script>
36+
var switchInstance = $("#switch").kendoSwitch().data("kendoSwitch");
37+
//get the Switch checked state
38+
console.log("Is Swicth checked?: " + switchInstance.check());
39+
40+
//set the Switch checked state
41+
switchInstance.check(true);
42+
43+
//get the Switch checked state
44+
console.log("Is Swicth checked?: " + switchInstance.check());
45+
</script>
3046

3147
## See Also
3248

docs/knowledge-base/grid-exclude-column-from-columns-menu.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,23 +28,36 @@ A Grid allows the user to hide or show columns through its column menu but how c
2828

2929
## Solution
3030

31-
Use the [`columnMenuInit`](https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/columnmenuinit) event of the Grid and remove the desired element or elements by using jQuery.
31+
Use the [`columnMenuInit`](https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/events/columnmenuinit) event of the Grid and add a `hidden` class to the desired element or elements by using jQuery.
32+
33+
```
34+
<style>
35+
.hidden {
36+
display: none !important;
37+
}
38+
</style>
39+
```
3240

3341
```
3442
columnMenuInit(e){
35-
e.container.find('li[role="menuitemcheckbox"]:nth-child(2)').remove();
43+
e.container.find('li[role="menuitemcheckbox"]:nth-child(2)').addClass("hidden");
3644
}
3745
```
3846

3947
The following example demonstrates the full implementation of the suggested approach.
4048

4149
```dojo
50+
<style>
51+
.hidden {
52+
display: none !important;
53+
}
54+
</style>
4255
<div id="grid"></div>
4356
<script>
4457
$(document).ready(function() {
4558
$("#grid").kendoGrid({
4659
columnMenuInit(e){
47-
e.container.find('li[role="menuitemcheckbox"]:nth-child(2)').remove();
60+
e.container.find('li[role="menuitemcheckbox"]:nth-child(2)').addClass("hidden");
4861
},
4962
dataSource: {
5063
type: "odata",
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
title: Display the Timeline Events in Reverse Chronological Order
3+
description: "An example demonstrating how to display the Timeline events in reverse chronological order."
4+
type: how-to
5+
page_title: Timeline Display of Events in Reverse Chronological Order | Kendo UI Timeline for jQuery
6+
slug: timeline-reverse-chronological-order
7+
tags: timeline, events, chronological, order, sort, reverse, descending
8+
res_type: kb
9+
---
10+
11+
## Environment
12+
13+
<table>
14+
<tr>
15+
<td>Product</td>
16+
<td>Timeline for Progress® Kendo UI®</td>
17+
</tr>
18+
<tr>
19+
<td>Product Version</td>
20+
<td>2021.2.616</td>
21+
</tr>
22+
</table>
23+
24+
## Description
25+
26+
How can I display the Timeline events in reverse chronological order?
27+
28+
## Solution
29+
30+
Utilize the [`sort`](https://docs.telerik.com/kendo-ui/api/javascript/data/datasource/configuration/sort) configuration of the DataSource and sort the date field in descending order.
31+
32+
```
33+
sort: { field: "date", dir: "desc" }
34+
```
35+
36+
```dojo
37+
<div id="timeline"></div>
38+
<script>
39+
const baseUrl = "https://demos.telerik.com/kendo-ui";
40+
41+
$(document).ready(function () {
42+
$("#timeline").kendoTimeline({
43+
dataSource: {
44+
transport: {
45+
read: {
46+
url: baseUrl + "/content/web/timeline/events-vertical-part1.json",
47+
dataType: "json"
48+
}
49+
},
50+
schema: {
51+
model: {
52+
fields: {
53+
date: {
54+
type: "date"
55+
}
56+
}
57+
}
58+
},
59+
sort: { field: "date", dir: "desc" }
60+
},
61+
alternatingMode: true,
62+
collapsibleEvents: true,
63+
orientation: "vertical"
64+
});
65+
});
66+
</script>
67+
```

0 commit comments

Comments
 (0)