Skip to content

Commit 83975aa

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 3e0f780 commit 83975aa

File tree

44 files changed

+2031
-1839
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2031
-1839
lines changed

docs-aspnet/getting-started-mvc/installation/getting-started-copy-client-resources.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,14 @@ For more information, refer to the article on [using the Kendo UI CDN services](
163163
<script src="https://kendo.cdn.telerik.com/{{ site.mvcCoreVersion }}/js/kendo.timezones.min.js"></script>
164164
<script src="https://kendo.cdn.telerik.com/{{ site.mvcCoreVersion }}/js/kendo.aspnetmvc.min.js"></script>
165165
166+
## Custom Download Builder
167+
168+
Users with a commercial license can use the [Custom Download Builder tool](https://www.telerik.com/download/custom-download) to create a single JavaScript file which contains the dependencies only for the required widgets and features.
169+
170+
> * Do not use multiple custom combined scripts, as they will contain duplicate code. Instead, create one combined script file, which includes everything you need.
171+
> * It is not possible to load Download Builder packages by using RequireJS, because the tool will not create the required AMD modules.
172+
> * Make sure the `Server Wrappers` checkbox is checked, to include the scripts required by the wrappers.
173+
166174
## See Also
167175
168176
* [Telerik UI for ASP.NET MVC Fundamentals]({% slug fundamentals_aspnetmvc %})

docs-aspnet/html-helpers/editors/imageeditor/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ position: 1
1010

1111
The Telerik UI ImageEditor HtmlHelper for {{ site.framework }} is a server-side wrapper for the Kendo UI ImageEditor widget.
1212

13-
The ImageEditor utilizes a canvas element and enables image editing. It allows you to open, edit and save edited images.
13+
The ImageEditor utilizes a canvas element and enables image editing. It allows you to open, edit and save edited `.png`, `.jpg`, or `.jpeg` images.
1414

1515
* [Demo page for the ImageEditor](https://demos.telerik.com/{{ site.platform }}/imageeditor/index)
1616

docs-aspnet/html-helpers/gauges/arcgauge/scale.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,18 @@ The scale of the Telerik UI ArcGauge for {{ site.framework }} renders the values
4444
)
4545
````
4646

47+
## Reverse
48+
49+
Reverses the scale direction - values are increased counterclockwise.
50+
51+
````CSHTML
52+
@(Html.Kendo().ArcGauge()
53+
.Name("gauge")
54+
.Value(65)
55+
.Scale(x => x.Reverse(true))
56+
)
57+
````
58+
4759
## See Also
4860

4961
* [Overview of the ArcGauge]({%slug overview_arcgaugehelper_aspnetcore%})

docs-aspnet/html-helpers/layout/badge/overview.md

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,37 @@ The following example demonstrates how to define the Badge by using the Badge Ht
2020

2121

2222
<a class="k-button">
23-
@(Html.Kendo().Badge()
24-
.Name("badge")
25-
.Value("42")
26-
.Appearance("rectangle"))
23+
@(Html.Kendo().Badge()
24+
.Name("badge")
25+
.Text("42")
26+
.Shape(BadgeShape.Rectangle)
27+
)
2728
</a>
2829

2930
## Basic Configuration
3031

3132
The badge also provides the choice to be inline or overlay and set its type. To make the badge overlay add the `k-badge-overlay` class to the parent parent element.
3233

3334
<a class="k-button k-badge-overlay">
34-
@(Html.Kendo().Badge()
35-
.Name("badge")
36-
.Value("42")
37-
.Type("warning")
38-
.Appearance("rectangle"))
35+
@(Html.Kendo().Badge()
36+
.Name("badge")
37+
.Text("42")
38+
.ThemeColor(BadgeColor.Warning)
39+
.Shape(BadgeShape.Rounded)
40+
)
3941
</a>
4042

4143
## Using templates
4244

4345
With the badge you can customize the content using templates.
4446

4547
<a class="k-button k-badge-overlay">
46-
@(Html.Kendo().Badge()
47-
.Name("badge")
48-
.Value("42")
49-
.Template("#= +value > 10 ? '9+' : value #")
50-
.Appearance("rectangle"))
48+
@(Html.Kendo().Badge()
49+
.Name("badge")
50+
.Text("120")
51+
.Template("#= +this._text > 100 ? 'a lot' : this._text #")
52+
.Shape(BadgeShape.Rectangle)
53+
)
5154
</a>
5255

5356
## Using as a label
@@ -99,12 +102,22 @@ You can integrate the Badge into other UI components. The following example demo
99102
You can access an existing Button instance by using the [`jQuery.data()`](https://api.jquery.com/jQuery.data/) method which gets executed by the jQuery object of the originating element. Once the reference is established, use the [Badge client-side API](https://docs.telerik.com/kendo-ui/api/javascript/ui/badge#methods) to control its behavior.
100103
101104
<a class="k-button k-badge-overlay">
102-
@(Html.Kendo().Badge()
103-
.Name("badge")
104-
.Value("42")
105-
.Template("#= +value > 10 ? '9+' : value #")
106-
.Appearance("rectangle"))
105+
@(Html.Kendo().Badge()
106+
.Name("badge")
107+
.Text("42")
108+
.TemplateId("badge-template")
109+
.Shape(BadgeShape.Pill)
110+
)
107111
</a>
112+
113+
<script type="text/x-kendo-template" id="badge-template">
114+
# var badgeText = this.options.text;#
115+
#if(badgeText > 100){#
116+
100+
117+
#}else{#
118+
#=badgeText#
119+
#}#
120+
</script>
108121

109122
<script>
110123
var badge = $('#badge').data('kendoBadge');

docs-aspnet/html-helpers/layout/tilelayout/resizing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The resizing takes advantage of the [CSS Grid](https://css-tricks.com/snippets/c
1515
## Enabling the resizable feature of the TileLayout
1616

1717
To enable the resizable feature of the TileLayout, set the [`Resizable()`](/api/Kendo.Mvc.UI.Fluent/TileLayoutBuilder#resizable) method {% if site.mvc %}
18-
and pass `true` as a parameter{% endif %}.
18+
and pass `true` as a parameter{% endif %}. When resizable is enabled, the TileLayout items should have `RowSpan` and `ColSpan` defined.
1919

2020
The example below will render a grid with two rows and two columns which can be resized both vertically and horizontally.
2121

docs-aspnet/html-helpers/layout/window/forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The following example demonstrates how to insert a complete form inside the Wind
3030

3131
## Loading External Form
3232

33-
The Telerik UI Window for ASP.NET MVC enables you to use the `LoadContentFrom()` method to load content from a view into the popup content.
33+
The Telerik UI Window for {{ site.framework }} enables you to use the `LoadContentFrom()` method to load content from a view into the popup content.
3434

3535
Though the Window allows the creation of popup forms, you need to consider the conceptual differences during their implementation. Typically, if you load a view into a Kendo UI for jQuery Window, it does not act as a separate browser window. This means that any returned data from the form submit action loads into the main page and eventually might lead to unexpected results.
3636

docs-aspnet/html-helpers/scheduling/gantt/binding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ position: 3
99

1010
# Data Binding
1111

12-
By default, the Telerik UI Gantt for ASP.NET MVC performs server-side requests (`HTTP` and `GET`) when doing paging, sorting, and filtering.
12+
By default, the Telerik UI Gantt for {{ site.framework }} performs server-side requests (`HTTP` and `GET`) when doing paging, sorting, and filtering.
1313

1414
You can also render the view with the data for the tasks and dependences. You have to implement the `IGanttTask` and `IGanttDependency` interfaces in the data models for the `GanttTasks` and `GantDependencies` respectively.
1515

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Select Only One Grid Row with the Checkbox selectable column
3+
description: Remove the master checkbox of the built-in checkbox column in the Telerik UI Grid. Limit the selection to ine selected Grid row only.
4+
type: how-to
5+
page_title: Limit the Selection to a Single Row
6+
slug: grid-singe-checkbox-selection
7+
tags: grid, checkbox, single, select, one, row, only
8+
res_type: kb
9+
---
10+
11+
## Environment
12+
13+
<table>
14+
<tbody>
15+
<tr>
16+
<td>Product</td>
17+
<td>Progress® Telerik® UI Grid for {{ site.product_short }}</td>
18+
</tr>
19+
</tbody>
20+
</table>
21+
22+
## Description
23+
24+
I want to remove the master checkbox of the built-in checkbox column in the Telerik UI Grid. How can I limit the selection to one selected Grid row only?
25+
26+
## Solution
27+
1. Remove the master checkbox by adding an empty header template to the column.
28+
2. Subscribe for the [click](https://api.jquery.com/click/) event of the checkboxes by using a jQuery selector.
29+
3. In the `click` event handler, get the row and the row classes by using the [closest](https://api.jquery.com/closest/) jQuery method.
30+
4. Based on the row classes, use the [clearSelection](https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/methods/clearselection) method of the Grid.
31+
32+
```View
33+
34+
@(Html.Kendo().Grid<CheckboxSelectOneRowOnly.Models.OrderViewModel>()
35+
.Name("grid")
36+
.Columns(columns =>
37+
{
38+
columns.Select().Width(50).HeaderTemplate(h=>h);
39+
columns.Bound(p => p.OrderID).Filterable(false);
40+
columns.Bound(p => p.Freight);
41+
columns.Bound(p => p.OrderDate).Format("{0:MM/dd/yyyy}");
42+
columns.Bound(p => p.ShipName);
43+
columns.Bound(p => p.ShipCity);
44+
})
45+
.Pageable()
46+
.Sortable()
47+
.Scrollable()
48+
.Filterable()
49+
.HtmlAttributes(new { style = "height:550px;" })
50+
.DataSource(dataSource => dataSource
51+
.Ajax()
52+
.PageSize(20)
53+
.Read(read => read.Action("Orders_Read", "Grid"))
54+
)
55+
)
56+
```
57+
```script.js
58+
$(document).ready(function () {
59+
var grid = $("#grid").data("kendoGrid");
60+
grid.tbody.on("click", ".k-checkbox", onClick);
61+
function onClick(e) {
62+
var grid = $("#grid").data("kendoGrid");
63+
var row = $(e.target).closest("tr");
64+
65+
if (row.hasClass("k-state-selected")) {
66+
setTimeout(function (e) {
67+
var grid = $("#grid").data("kendoGrid");
68+
grid.clearSelection();
69+
})
70+
} else {
71+
grid.clearSelection();
72+
};
73+
};
74+
})
75+
```
76+
```Controller
77+
public partial class GridController : Controller
78+
{
79+
public ActionResult Orders_Read([DataSourceRequest]DataSourceRequest request)
80+
{
81+
var result = Enumerable.Range(0, 50).Select(i => new OrderViewModel
82+
{
83+
OrderID = i,
84+
Freight = i * 10,
85+
OrderDate = DateTime.Now.AddDays(i),
86+
ShipName = "ShipName " + i,
87+
ShipCity = "ShipCity " + i
88+
});
89+
90+
return Json(result.ToDataSourceResult(request));
91+
}
92+
}
93+
```
94+
```Model
95+
public class OrderViewModel
96+
{
97+
public int OrderID { get; internal set; }
98+
public int Freight { get; internal set; }
99+
public DateTime OrderDate { get; internal set; }
100+
public string ShipName { get; internal set; }
101+
public string ShipCity { get; internal set; }
102+
}
103+
```

docs-aspnet/tag-helpers/layout/badge/overview.md

Lines changed: 63 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,44 +18,100 @@ It also provides customizing its content through templates, setting different ty
1818

1919
The following example demonstrates how to define the Badge by using the Badge TagHelper.
2020

21-
```
21+
```tagHelper
22+
2223
<a class="k-button">
23-
<kendo-badge name="badge" value="42" appearance="rectangle">
24+
<kendo-badge name="badge" text="42" shape="@BadgeShape.Rectangle">
2425
</kendo-badge>
2526
</a>
2627
28+
```
29+
```cshtml
30+
31+
<a class="k-button">
32+
@(Html.Kendo().Badge()
33+
.Name("badge")
34+
.Text("42")
35+
.Shape(BadgeShape.Rectangle)
36+
)
37+
</a>
38+
2739
```
2840

2941
## Basic Configuration
3042

3143
The badge also provides the choice to be inline or overlay and set its type. To make the badge overlay add the `k-badge-overlay` class to the parent parent element.
3244

33-
```
45+
```tagHelper
46+
3447
<a class="k-button k-badge-overlay">
35-
<kendo-badge name="badge" value="42" type="warning" appearance="rectangle">
48+
<kendo-badge name="badge" text="42" theme-color="@BadgeColor.Warning" shape="@BadgeShape.Rounded">
3649
</kendo-badge>
3750
</a>
51+
52+
```
53+
```cshtml
54+
55+
<a class="k-button k-badge-overlay">
56+
@(Html.Kendo().Badge()
57+
.Name("badge")
58+
.Text("42")
59+
.ThemeColor(BadgeColor.Warning)
60+
.Shape(BadgeShape.Rounded)
61+
)
62+
</a>
63+
3864
```
3965

4066
## Using templates
4167

4268
With the badge you can customize the content using templates.
4369

44-
```
70+
```tagHelper
4571
<a class="k-button k-badge-overlay">
46-
<kendo-badge name="badge" value="42" type="warning" appearance="rectangle" template="#= +value > 10 ? '9+' : value #">
72+
<kendo-badge name="badge" text="101" theme-color="@BadgeColor.Success" shape="@BadgeShape.Pill" template-id="badge-template">
4773
</kendo-badge>
4874
</a>
75+
76+
<script type="text/x-kendo-template" id="badge-template">
77+
# var badgeText = this.options.text;#
78+
#if(badgeText > 100){#
79+
100+
80+
#}else{#
81+
#=badgeText#
82+
#}#
83+
</script>
4984
```
85+
```cshtml
5086
87+
<a class="k-button k-badge-overlay">
88+
@(Html.Kendo().Badge()
89+
.Name("badge")
90+
.Text("101")
91+
.ThemeColor(BadgeColor.Success)
92+
.Shape(BadgeShape.Pill)
93+
.TemplateId("badge-template")
94+
)
95+
</a>
96+
97+
<script type="text/x-kendo-template" id="badge-template">
98+
# var badgeText = this.options.text;#
99+
#if(badgeText > 100){#
100+
100+
101+
#}else{#
102+
#=badgeText#
103+
#}#
104+
</script>
105+
106+
```
51107

52108
## Referencing Existing Instances
53109

54110
You can access an existing Button instance by using the [`jQuery.data()`](https://api.jquery.com/jQuery.data/) method which gets executed by the jQuery object of the originating element. Once a reference is established, use the [Badge client-side API](https://docs.telerik.com/kendo-ui/api/javascript/ui/badge#methods) to control its behavior.
55111

56112
```
57113
<a class="k-button k-badge-overlay">
58-
<kendo-badge name="badge" value="42" type="warning" appearance="rectangle">
114+
<kendo-badge name="badge" text="1" theme-color="@BadgeColor.Primary" shape="@BadgeShape.Circle">
59115
</kendo-badge>
60116
</a>
61117

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37591,7 +37591,7 @@ Saves the Chart as a PDF file using the options specified in [options.pdf](/api/
3759137591

3759237592
#### Example - export the Chart to PDF
3759337593
<!-- Load Pako ZLIB library to enable PDF compression -->
37594-
<script src="https://kendo.cdn.telerik.com/2018.3.1017/js/pako_deflate.min.js"></script>
37594+
<script src="https://kendo.cdn.telerik.com/{{ site.cdnVersion }}/js/pako_deflate.min.js"></script>
3759537595
<button id="exportBtn">Export to PDF</button>
3759637596
<div id="chart" style="width: 600px; height: 400px;"></div>
3759737597
<script>

0 commit comments

Comments
 (0)