Skip to content

Commit 2a6c589

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent dc8e992 commit 2a6c589

File tree

3 files changed

+93
-0
lines changed

3 files changed

+93
-0
lines changed

docs-aspnet-mvc/helpers/panelbar/overview.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,60 @@ Below are listed the steps for you to follow when defining the items of a Kendo
6262
)
6363
```
6464
65+
### Expand Mode
66+
67+
The PanelBar can be configured to use `Single` or `Multiple` expand mode. If the `ExpandMode` configuration option of the PanelBar is set to:
68+
69+
* `Single` - only a single root item or a single child item of a specific parent item can be expanded at a time. Expanding another root item or another child item of the currently expanded item's parent collapses the currently expanded item. This is also the only way to collapse an expanded item in `single` expand mode.
70+
* `Multiple` - multiple root items or children of the same parent item can be expanded at a time. Expanding an item does not collapse the currently expanded items. Expanded items can be collapsed by clicking on them.
71+
72+
###### Example
73+
74+
```tab-Razor
75+
76+
@(Html.Kendo().PanelBar()
77+
.Name("panelbar")
78+
.ExpandMode(PanelBarExpandMode.Single)
79+
.Items(items =>
80+
{
81+
items.Add().Text("Root1")
82+
.Items(subitems =>
83+
{
84+
subitems.Add().Text("Level2 1");
85+
subitems.Add().Text("Level2 2");
86+
});
87+
items.Add().Text("Root2")
88+
.Items(subitems =>
89+
{
90+
subitems.Add().Text("Level2 1");
91+
subitems.Add().Text("Level2 2");
92+
});
93+
})
94+
)
95+
```
96+
```tab-ASPX
97+
98+
<%: Html.Kendo().PanelBar()
99+
.Name("panelbar")
100+
.ExpandMode(PanelBarExpandMode.Single)
101+
.Items(items =>
102+
{
103+
items.Add().Text("Root1")
104+
.Items(subitems =>
105+
{
106+
subitems.Add().Text("Level2 1");
107+
subitems.Add().Text("Level2 2");
108+
});
109+
items.Add().Text("Root2")
110+
.Items(subitems =>
111+
{
112+
subitems.Add().Text("Level2 1");
113+
subitems.Add().Text("Level2 2");
114+
});
115+
})
116+
%>
117+
```
118+
65119
### Sitemap Binding
66120
67121
Below are listed the steps for you to follow when binding a Kendo UI PanelBar to a sitemap.

docs/api/javascript/ui/grid.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10305,6 +10305,8 @@ Fired when the user collapses a group row.
1030510305

1030610306
The event handler function context (available via the `this` keyword) will be set to the widget instance.
1030710307

10308+
Introduced in the Kendo UI 2017 R3 (2017.3.913) release.
10309+
1030810310
#### Event Data
1030910311

1031010312
##### e.element `jQuery`
@@ -10371,6 +10373,8 @@ Fired when the user expands a group row.
1037110373

1037210374
The event handler function context (available via the `this` keyword) will be set to the widget instance.
1037310375

10376+
Introduced in the Kendo UI 2017 R3 (2017.3.913) release.
10377+
1037410378
#### Event Data
1037510379

1037610380
##### e.element `jQuery`

docs/controls/navigation/panelbar/overview.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,41 @@ The following example demonstrates how to load a PanelBar item content asynchron
212212

213213
When the PanelBar loads remote content via AJAX, the server response is cached in-memory so that subsequent expand/collapse actions do not trigger subsequent AJAX requests.
214214

215+
### Expand Mode
216+
217+
The PanelBar can be configured to use `single` or `multiple` expand mode. If the `expandMode` configuration option of the PanelBar is set to:
218+
219+
* `single` - only a single root item or a single child item of a specific parent item can be expanded at a time. Expanding another root item or another child item of the currently expanded item's parent collapses the currently expanded item. This is also the only way to collapse an expanded item in `single` expand mode.
220+
* `multiple` - multiple root items or children of the same parent item can be expanded at a time. Expanding an item does not collapse the currently expanded items. Expanded items can be collapsed by clicking on them.
221+
222+
###### Example
223+
224+
<div id="panelbar"></div>
225+
<script>
226+
var items = [
227+
{ ProductName: "Root1", items: [
228+
{ ProductName: "Level2 1", items: [
229+
{ ProductName: "Level3 1" },
230+
{ ProductName: "Level3 2" }
231+
]},
232+
{ ProductName: "Level2 2", items: [
233+
{ ProductName: "Level3 1" },
234+
{ ProductName: "Level3 2" }
235+
]}
236+
]},
237+
{ ProductName: "Root2", items: [
238+
{ ProductName: "Level2 1" }
239+
]}
240+
];
241+
242+
$("#panelbar").kendoPanelBar({
243+
dataTextField: "ProductName",
244+
dataSource: items,
245+
expandMode: "single"
246+
});
247+
</script>
248+
249+
215250
### PanelBar Animations
216251

217252
By default, a PanelBar uses animations to expand and reveal sub-items when an item header is clicked. These animations can be modified in configuration via the open and close animation properties. A PanelBar can also be configured to only allow one panel be opened at a time.

0 commit comments

Comments
 (0)