You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/intro/installation/nuget-install.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -86,6 +86,8 @@ Regardless of the package installation approach you choose, after the installati
86
86
87
87

88
88
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
+
89
91
### Install with the Package Manager Dialog
90
92
91
93
To install the Kendo UI for jQuery packages by using the **Package Manager** dialog:
>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
+
43
48
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.
Copy file name to clipboardExpand all lines: docs/knowledge-base/mvvm-pass-parameters-from-view-to-view-model-function.md
+49-49Lines changed: 49 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,61 +23,61 @@ component: mvvm
23
23
24
24
I am building a screen where, depending on the selected option from a DropDownList, specific controls will be visible.
25
25
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?
27
27
28
28
## Solution
29
29
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.
31
31
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.
54
35
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>
71
58
72
-
if (valuesArray.includes(currentSelectedOption.toString())) {
0 commit comments