Skip to content

Commit ab00e48

Browse files
author
Kendo Bot
committed
Sync with Kendo UI Professional
1 parent 73990a9 commit ab00e48

File tree

4 files changed

+111
-2
lines changed

4 files changed

+111
-2
lines changed

docs-aspnet/html-helpers/data-management/filemanager/context-menu.md

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The {{ site.product }} FileManager's ContextMenu enables you to easily execute F
1212

1313
The component uses the {{ site.product }} ContextMenu, enabling you to get full advantage of its [Client API](https://docs.telerik.com/kendo-ui/api/javascript/ui/filemanager). Once an item is selected, the corresponding command is executed.
1414

15-
The default items in the ContextMenu are `rename` and `delete`. You can define your custom items which can execute custom commands. You can also manage what items should be visible, by enumerating the needed ones in the initialization of the component (see Example below)
15+
The built-in items in the ContextMenu are `rename` and `delete`. You can define your custom items which can execute custom commands. You can also manage what items should be visible, by enumerating the needed ones in the initialization of the component (see Example below)
1616

1717
@(Html.Kendo().FileManager()
1818
.Name("filemanager")
@@ -24,6 +24,47 @@ The default items in the ContextMenu are `rename` and `delete`. You can define y
2424
...
2525
)
2626

27+
28+
## Custom ContextMenu Items
29+
30+
To add a custom command to the context menu of the FileManager, follow the instuctions below. There is no limitation for the number of custom items.
31+
32+
1. Add the item, set text and specify a command name:
33+
34+
```
35+
.ContextMenu(context =>
36+
{
37+
context.Items(items =>
38+
{
39+
items.Add("rename");
40+
items.Add("delete");
41+
items.Add("custom").Text("Custom button").Command("MyCustomCommand");
42+
});
43+
})
44+
```
45+
46+
1. Create the command for the FileManager:
47+
48+
```
49+
$(function(){
50+
var filemanagerNS = kendo.ui.filemanager;
51+
52+
filemanagerNS.commands.MyCustomCommand = filemanagerNS.FileManagerCommand.extend({
53+
exec: function () {
54+
var that = this,
55+
filemanager = that.filemanager, // get the kendo.ui.FileManager instance
56+
options = that.options, // get the options passed through the tool
57+
target = options.target // options.target is available only when command is executed from the context menu
58+
selectedFiles = filemanager.getSelected(); // get the selected files
59+
60+
console.log(options.arg, target, selectedFiles);
61+
// Proceed with the logic of the custom command.
62+
}
63+
});
64+
});
65+
```
66+
67+
2768
## See Also
2869
2970
* [Overview of FileManager]({% slug htmlhelpers_filemanager_aspnetcore_overview %})

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ The following example demonstrates the basic configuration of the Responsive Pan
4848
)
4949
```
5050

51-
51+
> The Telerik UI ResponsivePanel accepts any HTML that is passed in the `Content` option. For more advanced scenarios, pass custom HTML of your choice.
5252
5353
## See Also
5454

docs-aspnet/tag-helpers/data-management/grid/editing.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,73 @@ The example below demonstrates how to implement batch editing in the Grid. For a
9393
)
9494
)
9595
```
96+
```ProductViewModel.cs
97+
public class ProductViewModel
98+
{
99+
public int ProductID
100+
{
101+
get;
102+
set;
103+
}
104+
105+
[Required]
106+
[DisplayName("Product name")]
107+
public string ProductName
108+
{
109+
get;
110+
set;
111+
}
112+
113+
[DisplayName("Unit price")]
114+
[DataType(DataType.Currency)]
115+
[Range(0, int.MaxValue)]
116+
public decimal UnitPrice
117+
{
118+
get;
119+
set;
120+
}
121+
122+
[DisplayName("Units in stock")]
123+
[DataType("Integer")]
124+
[Range(0, int.MaxValue)]
125+
public int UnitsInStock
126+
{
127+
get;
128+
set;
129+
}
130+
131+
public bool Discontinued
132+
{
133+
get;
134+
set;
135+
}
136+
137+
[DisplayName("Last supply")]
138+
[DataType(DataType.Date)]
139+
public DateTime LastSupply
140+
{
141+
get;
142+
set;
143+
}
144+
145+
[DataType("Integer")]
146+
public int UnitsOnOrder
147+
{
148+
get;
149+
set;
150+
}
151+
152+
public CategoryViewModel Category
153+
{
154+
get;
155+
set;
156+
}
157+
158+
public int? CategoryID { get; set; }
159+
160+
public string QuantityPerUnit { get; set; }
161+
}
162+
```
96163

97164
## Custom Editors
98165

docs-aspnet/tag-helpers/editors/editor/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,4 @@ To configure other Editor options, such as PDF export, immutables, rezisability
176176

177177
* [Basic Usage of the Editor TagHelper for ASP.NET Core (Demo)](https://demos.telerik.com/aspnet-core/editor/tag-helper)
178178
* [Server-Side API](/api/editor)
179+
* [Client-Side API](https://docs.telerik.com/kendo-ui/api/javascript/ui/editor#methods)

0 commit comments

Comments
 (0)