Skip to content

Commit b9826f7

Browse files
committed
Sync with Kendo UI Professional
1 parent 8e77ce3 commit b9826f7

File tree

3 files changed

+56
-49
lines changed

3 files changed

+56
-49
lines changed

docs/intro/installation/nuget-install.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ Regardless of the package installation approach you choose, after the installati
8686
8787
![Kendo UI for jQuery Folder Structure](../../images/kendo-folder-structure.png)
8888
89+
> The installation approach with the NuGet works only with .NET MVC projects that have the `Content` and `Scripts` folders. In a .NET Core(and newer) projects, the resources(scripts and styles) must be copied manually in the `wwwroot` folder.
90+
8991
### Install with the Package Manager Dialog
9092
9193
To install the Kendo UI for jQuery packages by using the **Package Manager** dialog:

docs/intro/widget-basics/create-custom-kendo-widget.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,14 @@ Kendo UI provides options for you to create your own components by inheriting fr
3737
// The base call to initialize the component.
3838
Widget.fn.init.call(this, element, options);
3939

40+
// Add styling classes only for the updated components
41+
//$(element).parent().addClass("k-input-solid k-input-md k-rounded-md");
42+
4043
}
4144
});
4245

46+
>Some components received new rendering improving their style options. This requires adding the styling classes for these components in the `init` function. [Here is a list](https://docs.telerik.com/kendo-ui/styles-and-layout/components-rendering-overview#updated-components) of the updated components.
47+
4348
1. If you are extending a component, the call to the base is what translates your component from declarative initialization or the standard imperative initialization, and merges all the base options and custom options. Declare those options right under the `init` statement. Anything that you declare in the `options` object will be available for the user to pass as either a configuration value or as a `data` attribute.
4449

4550
var MyWidget = Widget.extend({

docs/knowledge-base/mvvm-pass-parameters-from-view-to-view-model-function.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -23,61 +23,61 @@ component: mvvm
2323

2424
I am building a screen where, depending on the selected option from a DropDownList, specific controls will be visible.
2525

26-
How can I use a single function that is defined in the `viewModel` to control the visibility of these elements? How can I pass a different argument to that function according to the actual HTML element it is used for?
26+
How can I use a single function that is defined in the `viewModel` to control the visibility of these elements? How can I pass a different argument to that function according to the actual HTML element it is used for?
2727

2828
## Solution
2929

30-
Pass a single string argument as a function parameter. For example, if you need to pass an array, pass it as a string with a certain delimiter.
30+
Passing arguments as a function parameter is not valid. If a value from the View-Model requires processing before displaying it in the View, a method should be created and used instead.
3131

32-
````dojo
33-
<div>
34-
<label for="selection">Selection: </label>
35-
<input id="selection"
36-
data-role="dropdownlist"
37-
data-text-field="txt"
38-
data-value-field="id"
39-
data-bind="source: selectionDataSource,
40-
value: selectedOption"/>
41-
</div>
42-
<div data-bind="visible: visibleTextBox('1q3')">
43-
<label for="amount">Textbox 1: </label>
44-
<input id="amount"
45-
data-role="numerictextbox"
46-
data-bind="value: defaultTextBox1Value"/>
47-
</div>
48-
<div data-bind="visible: visibleTextBox('2q4')">
49-
<label for="initialAmount">Textbox 2: </label>
50-
<input id="initialAmount"
51-
data-role="numerictextbox"
52-
data-bind="value: defaultTextBox2Value"/>
53-
</div>
32+
>Bindings are not JavaScript code. Although bindings look like JavaScript code, they are not. The `<div data-bind="text: person.name.toLowerCase()"></div>` chunk of code is not a valid Kendo UI MVVM binding declaration. If a value from the View-Model requires processing before displaying it in the View, a method must be created and used instead. Note: Although the approach was working with older Kendo UI for jQuery versions, with the CSP compliance improvements introduced with the 2023 R1 release, the approach could not be used.
33+
34+
In the following example a TextBox will be visible if `Seelction 1` or `Selection 2` option is selected from the DropDownList.
5435

55-
<script>
56-
var viewModel = kendo.observable({
57-
selectionDataSource: new kendo.data.DataSource({
58-
data: [
59-
{ txt: "Selection 1", id: 1 },
60-
{ txt: "Selection 2", id: 2 },
61-
{ txt: "Selection 3", id: 3 },
62-
{ txt: "Selection 4", id: 4 },
63-
]
64-
}),
65-
defaultTextBox1Value: function() { return 1; },
66-
defaultTextBox2Value: function() { return 2; },
67-
selectedOption: 1,
68-
visibleTextBox: function(values) {
69-
var valuesArray = values.split('q');
70-
var currentSelectedOption = this.get('selectedOption');
36+
````dojo
37+
<div>
38+
<label for="selection">Selection: </label>
39+
<input id="selection"
40+
data-role="dropdownlist"
41+
data-text-field="txt"
42+
data-value-field="id"
43+
data-bind="source: selectionDataSource,
44+
value: selectedOption"/>
45+
</div>
46+
<div data-bind="visible: visibleTextBox1">
47+
<label for="amount">Textbox 1: </label>
48+
<input id="amount"
49+
data-role="numerictextbox"
50+
data-bind="value: defaultTextBox1Value"/>
51+
</div>
52+
<div data-bind="visible: visibleTextBox2">
53+
<label for="initialAmount">Textbox 2: </label>
54+
<input id="initialAmount"
55+
data-role="numerictextbox"
56+
data-bind="value: defaultTextBox2Value"/>
57+
</div>
7158
72-
if (valuesArray.includes(currentSelectedOption.toString())) {
73-
return true;
74-
} else {
75-
return false;
76-
}
77-
}
78-
});
79-
kendo.bind($("body"), viewModel);
80-
</script>
59+
<script>
60+
var viewModel = kendo.observable({
61+
selectionDataSource: new kendo.data.DataSource({
62+
data: [
63+
{ txt: "Selection 1", id: 1 },
64+
{ txt: "Selection 2", id: 2 },
65+
{ txt: "Selection 3", id: 3 },
66+
{ txt: "Selection 4", id: 4 },
67+
]
68+
}),
69+
defaultTextBox1Value: function() { return 1; },
70+
defaultTextBox2Value: function() { return 2; },
71+
selectedOption: 1,
72+
visibleTextBox1: function () {
73+
return this.get('selectedOption') === 1;
74+
},
75+
visibleTextBox2: function () {
76+
return this.get('selectedOption') === 2;
77+
}
78+
});
79+
kendo.bind($("body"), viewModel);
80+
</script>
8181
````
8282

8383
## See Also

0 commit comments

Comments
 (0)