Skip to content

Commit 8074546

Browse files
committed
Sync with Kendo UI Professional
1 parent 40acf95 commit 8074546

File tree

7 files changed

+515
-1
lines changed

7 files changed

+515
-1
lines changed

docs-aspnet/html-helpers/data-management/pivotgrid/filtering.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,72 @@ The filter descriptor is similar to [the filter option of the `kendo.data.DataSo
1717
- `operator`—All operators that work with strings. Note that the widget treats field values as strings.
1818
- `value`—The filter value.
1919

20+
### Filtering when using Xmla DataSource
21+
22+
To set a predefined filter when using Xmla data use the above-described approach and set the filter configuration of the PivotDataSource, following the [guidelines for MDX queries](https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/mdx-query-fundamentals-analysis-services?view=asallproducts-allversions) and [Members, Tuples, and Sets](https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/working-with-members-tuples-and-sets-mdx?view=asallproducts-allversions).
23+
24+
25+
```HtmlHelper
26+
.Filter(f =>
27+
{
28+
f.Add("[Geography].[City]").StartsWith("Ev");
29+
f.Add("[Date].[Calendar]").In("[Date].[Calendar].[Calendar Year].&[2010],[Date].[Calendar].[Calendar Year].&[2013]");
30+
})
31+
```
32+
{% if site.core %}
33+
```TagHelper
34+
@{
35+
var filterValue = "[Date].[Calendar].[Calendar Year].&[2010],[Date].[Calendar].[Calendar Year].&[2013]";
36+
}
37+
38+
<kendo-pivotdatasource type=@(PivotDataSourceType.Xmla) name="pivotSource" on-error="onError">
39+
<columns>
40+
<pivot-datasource-column name="[Date].[Calendar]" expand="true"></pivot-datasource-column>
41+
<pivot-datasource-column name="[Product].[Category]"></pivot-datasource-column>
42+
</columns>
43+
<rows>
44+
<row name="[Geography].[City]"></row>
45+
</rows>
46+
<schema type="xmla"/>
47+
<measures values=@(new string[] {"[Measures].[Reseller Freight Cost]"} ) ></measures>
48+
<transport>
49+
<read url="https://demos.telerik.com/olap/msmdpump.dll" datatype="text" content-type="text/xml" type="POST" />
50+
<connection catalog="Adventure Works DW 2008R2" cube="Adventure Works"></connection>
51+
</transport>
52+
<filters>
53+
<datasource-filter field="[Date].[Calendar]" operator="in" value=@filterValue ></datasource-filter>
54+
</filters>
55+
</kendo-pivotdatasource>
56+
```
57+
{% endif %}
58+
59+
### Filtering when using Flat Data
60+
61+
Build the filter descriptor similar to [the filter option of the `kendo.data.DataSource`](/api/javascript/data/datasource/configuration/filter).
62+
63+
```HtmlHelper
64+
.Filter(f =>
65+
{
66+
f.Add(p=>p.ProductName).Contains("An");
67+
f.Add(p => p.Discontinued).IsEqualTo(true);
68+
})
69+
```
70+
{% if site.core %}
71+
```TagHelper
72+
@{
73+
var productName = "An";
74+
var discontinued = true;
75+
}
76+
77+
<kendo-pivotdatasource>
78+
<filters>
79+
<datasource-filter field="ProductName" operator="contains" value="@productName" ></datasource-filter>
80+
<datasource-filter field="Discontinued" operator="eq" value="@discontinued" ></datasource-filter>
81+
</filters>
82+
</kendo-pivotdatasource>
83+
```
84+
{% endif %}
85+
2086
## See Also
2187

2288
* [Basic Usage of the PivotGrid HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/pivotgrid/index)
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
title: Filtering
3+
page_title: Filtering
4+
description: "Get started with the Telerik UI PivotGridV2 component for {{ site.framework }} and learn how to filter a Telerik UI PivotGridV2 component for {{ site.framework }}."
5+
slug: htmlhelpers_pivotgridv2_aspnetcore_filtering
6+
position: 5
7+
---
8+
9+
# Filtering
10+
11+
The PivotGridV2 supports filtering both in the OLAP and flat data-binding scenarios.
12+
13+
The PivotGridV2 uses [`kendo.data.PivotDataSource`](/api/pivotdatasource) to perform `label` filtration. However, it filters only by the caption value of the members.
14+
15+
The filter descriptor is similar to [the filter option of the `kendo.data.DataSource`](/api/datasource) and contains the following options:
16+
- `field`&mdash;The full path to the tuple member. For example, `[Date].[Calendar].[Calendar Year].&[2005]`.
17+
- `operator`&mdash;All operators that work with strings. Note that the widget treats field values as strings.
18+
- `value`&mdash;The filter value.
19+
20+
### Filtering when using Xmla DataSource
21+
22+
To set a predefined filter when using Xmla data use the above-described approach and set the filter configuration of the PivotDataSource, following the [guidelines for MDX queries](https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/mdx-query-fundamentals-analysis-services?view=asallproducts-allversions) and [Members, Tuples, and Sets](https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/working-with-members-tuples-and-sets-mdx?view=asallproducts-allversions).
23+
24+
25+
```HtmlHelper
26+
.Filter(f =>
27+
{
28+
f.Add("[Geography].[City]").StartsWith("Ev");
29+
f.Add("[Date].[Calendar]").In("[Date].[Calendar].[Calendar Year].&[2010],[Date].[Calendar].[Calendar Year].&[2013]");
30+
})
31+
```
32+
{% if site.core %}
33+
```TagHelper
34+
@{
35+
var filterValue = "[Date].[Calendar].[Calendar Year].&[2010],[Date].[Calendar].[Calendar Year].&[2013]";
36+
}
37+
38+
<pivot-datasource type=@(PivotDataSourceType.Xmla) name="pivotSource" on-error="onError">
39+
<columns>
40+
<pivot-datasource-column name="[Date].[Calendar]" expand="true"></pivot-datasource-column>
41+
<pivot-datasource-column name="[Product].[Category]"></pivot-datasource-column>
42+
</columns>
43+
<rows>
44+
<row name="[Geography].[City]"></row>
45+
</rows>
46+
<schema type="xmla"/>
47+
<measures values=@(new string[] {"[Measures].[Reseller Freight Cost]"} ) ></measures>
48+
<transport>
49+
<read url="https://demos.telerik.com/olap/msmdpump.dll" datatype="text" content-type="text/xml" type="POST" />
50+
<connection catalog="Adventure Works DW 2008R2" cube="Adventure Works"></connection>
51+
</transport>
52+
<filters>
53+
<datasource-filter field="[Date].[Calendar]" operator="in" value=@filterValue ></datasource-filter>
54+
</filters>
55+
</pivot-datasource>
56+
```
57+
{% endif %}
58+
59+
### Filtering when using Flat Data
60+
61+
Build the filter descriptor similar to [the filter option of the `kendo.data.DataSource`](/api/javascript/data/datasource/configuration/filter).
62+
63+
```HtmlHelper
64+
.Filter(f =>
65+
{
66+
f.Add(p=>p.ProductName).Contains("An");
67+
f.Add(p => p.Discontinued).IsEqualTo(true);
68+
})
69+
```
70+
{% if site.core %}
71+
```TagHelper
72+
@{
73+
var productName = "An";
74+
var discontinued = true;
75+
}
76+
77+
<pivot-datasource>
78+
<filters>
79+
<datasource-filter field="ProductName" operator="contains" value="@productName" ></datasource-filter>
80+
<datasource-filter field="Discontinued" operator="eq" value="@discontinued" ></datasource-filter>
81+
</filters>
82+
</pivot-datasource>
83+
```
84+
{% endif %}
85+
86+
## See Also
87+
88+
* [Basic Usage of the PivotGridV2 HtmlHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/PivotGridV2/index)
89+
{% if site.core %}
90+
* [Basic Usage of the PivotGridV2 TagHelper for {{ site.framework }} (Demo)](https://demos.telerik.com/{{ site.platform }}/PivotGridV2/tag-helper)
91+
{% endif %}
92+
* [Server-Side API](/api/PivotGridV2)

docs-aspnet/html-helpers/navigation/panelbar/security-trimming.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,59 @@ The PanelBar hides an item if the [`OnAuthorization`](http://msdn.microsoft.com/
2020

2121
For more information on using a custom `AuthorizeAttribute`, refer to [this article](https://github.com/telerik/kendo-examples-asp-net-mvc/tree/master/kendo-menu-with-custom-authorization-attribute).
2222

23+
## Known Limitations
24+
25+
The Security Trimming functionality of the component is supported when using [Items Binding]({% slug itemsbinding_panelbarhelper_aspnetmvc %}) or [SiteMap Binding]({% slug sitemapbinding_panelbarhelper_aspnetmvc %}) and the path for an item is provided via the `Action()` overloads that accept a `Controller` name, `Action` name and/or `RouteValueDictionary` as parameters. The functionality is not supported when using [Ajax binding]({% slug htmlhelpers_panelbar_ajaxbinding_aspnetcore %}) and defining a DataUrlField.
26+
27+
The example below demonstrates how to configure the PanelBar component and its items, so the Security Trimming functionality works as expected:
28+
29+
```cshtml
30+
@(Html.Kendo().PanelBar()
31+
.Name("panelBar")
32+
.SecurityTrimming(true)
33+
.Items(data =>
34+
{
35+
data.Add().Text("About").Action("About", "Home"); // item will be visible as endpoint is accessible.
36+
data.Add().Text("Info").LoadContentFrom("Info", "Home"); // item will be visible as content endpoint is accessible.
37+
data.Add().Text("Details").Action("Details", "Home"); // item will be hidden for non-authorized users.
38+
data.Add().Text("Important Details").LoadContentFrom("ImportantDetails", "Home"); // item will be hidden for non-authorized users as access to content endpoint is restricted.
39+
data.Add().Text("Details as url").Url("~/Home/Details"); // unsupported scenario - item won't be trimmed, even though endpoint is inaccessible.
40+
data.Add().Text("Important Details as url").LoadContentFrom("~/Home/ImportantDetails"); // unsupported scenario - item won't be trimmed, even though content endpoint is inaccessible.
41+
})
42+
)
43+
```
44+
```Controller
45+
public class HomeController : Controller
46+
{
47+
public ActionResult Index()
48+
{
49+
return View();
50+
}
51+
52+
public ActionResult About()
53+
{
54+
return View();
55+
}
56+
57+
public ActionResult Info()
58+
{
59+
return PartialView();
60+
}
61+
62+
[Authorize]
63+
public ActionResult Details()
64+
{
65+
return new HttpUnauthorizedResult("Denied");
66+
}
67+
68+
[Authorize]
69+
public ActionResult ImportantDetails()
70+
{
71+
return PartialView();
72+
}
73+
}
74+
```
75+
2376
## See Also
2477

2578
* [Basic Usage of the PanelBar HtmlHelper for ASP.NET MVC (Demo)](https://demos.telerik.com/aspnet-mvc/panelbar)

docs-aspnet/installation/system-requirements/os-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ To create .NET Core applications, you need to install the `.NET Core SDK`. Follo
4949
For a full list of the `.NET Core` requirements, see [.NET Core dependencies and requirements](https://docs.microsoft.com/en-us/dotnet/core/install/dependencies?tabs=netcore31&pivots=os-windows).
5050

5151
{% else %}
52-
{{ site.product }} supports Visual Studio 2013 and later. The supported development environments also include:
52+
{{ site.product }} supports Visual Studio 2019 and later. The supported development environments also include:
5353

5454
* [.NET Framework v4.6.2](https://www.microsoft.com/en-us/download/details.aspx?id=21) and later.
5555
* [ASP.NET MVC 5](https://docs.microsoft.com/en-us/aspnet/mvc/overview/getting-started/introduction/getting-started).

docs/controls/pivotgrid/filtering.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,95 @@ The filter descriptor is similar to [the filter option of the `kendo.data.DataSo
1717
- `operator`&mdash;All operators that work with strings. Note that the component treats field values as strings.
1818
- `value`&mdash;The filter value.
1919

20+
### Filtering when using Xmla DataSource
21+
22+
To set a predefined filter when using Xmla data use the above-described approach and set the filter configuration of the dataSource, following the [guidelines for MDX queries](https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/mdx-query-fundamentals-analysis-services?view=asallproducts-allversions) and [Members, Tuples, and Sets](https://learn.microsoft.com/en-us/analysis-services/multidimensional-models/mdx/working-with-members-tuples-and-sets-mdx?view=asallproducts-allversions).
23+
24+
The example below demonstrates how to filter data only for cities starting with "Ab" for the years 2010 and 2014:
25+
26+
```dojo
27+
<div id="pivotgrid"></div>
28+
<script>
29+
$("#pivotgrid").kendoPivotGrid({
30+
height: 550,
31+
filterable: true,
32+
dataSource: {
33+
type: "xmla",
34+
columns: [{ name: "[Date].[Calendar]", expand: true }, { name: "[Geography].[City]" } ],
35+
rows: [{ name: "[Product].[Product]" }],
36+
measures: ["[Measures].[Internet Sales Amount]"],
37+
transport: {
38+
connection: {
39+
catalog: "Adventure Works DW 2008R2",
40+
cube: "Adventure Works"
41+
},
42+
read: {
43+
url: "https://demos.telerik.com/olap/msmdpump.dll",
44+
dataType: "text",
45+
contentType: "text/xml",
46+
type: "POST"
47+
}
48+
},
49+
schema: {
50+
type: "xmla"
51+
},
52+
filter: [
53+
{
54+
field:"[Geography].[City]",
55+
operator:"startswith",
56+
value:"Ab"
57+
},{
58+
field: "[Date].[Calendar]",
59+
operator: "in",
60+
value: "[Date].[Calendar].[Calendar Year].&[2010],[Date].[Calendar].[Calendar Year].&[2014]"}
61+
]
62+
}
63+
});
64+
</script>
65+
```
66+
67+
### Filtering when using Flat Data
68+
69+
Build the filter descriptor similar to [the filter option of the `kendo.data.DataSource`](/api/javascript/data/datasource/configuration/filter), keeping in mind the field values are treated as strings.
70+
71+
For example, to filter a [PivotGrid bound to local data](https://demos.telerik.com/kendo-ui/pivotgrid/local-flat-data-binding) for products starting with "C" that are discontinued you can provide a filter configuration as demonstrated below:
72+
73+
```
74+
dataSource: {
75+
data: products,
76+
schema: {
77+
model: {
78+
fields: {
79+
ProductName: { type: "string" },
80+
UnitPrice: { type: "number" },
81+
UnitsInStock: { type: "number" },
82+
Discontinued: { type: "boolean" },
83+
CategoryName: { field: "Category.CategoryName" }
84+
}
85+
},
86+
cube: {
87+
dimensions: {
88+
ProductName: { caption: "All Products" },
89+
CategoryName: { caption: "All Categories" },
90+
Discontinued: { caption: "Discontinued" }
91+
},
92+
measures: {
93+
"Sum": { field: "UnitPrice", format: "{0:c}", aggregate: "sum" },
94+
"Average": { field: "UnitPrice", format: "{0:c}", aggregate: "average" }
95+
}
96+
}
97+
},
98+
columns: [{ name: "CategoryName", expand: true }, { name: "ProductName" } ],
99+
rows: [{ name: "Discontinued", expand: true }],
100+
measures: ["Sum"],
101+
filter:[{field: "ProductName", operator: "startswith", value: "C"},
102+
{field: "Discontinued", operator: "eq", value: true}]
103+
}
104+
```
105+
20106
## See Also
21107

22108
* [Filtering a Dimension in the PivotGrid]({% slug howto_filter_dimensions_pivotgrid %})
23109
* [Basic Usage of the PivotGrid (Demo)](https://demos.telerik.com/kendo-ui/pivotgrid/index)
110+
* [Binding the PivotGrid to flat local data (Demo)](https://demos.telerik.com/kendo-ui/pivotgrid/local-flat-data-binding)
24111
* [PivotGrid JavaScript API Reference](/api/javascript/ui/pivotgrid)

0 commit comments

Comments
 (0)