function fibonacci(num) { if (num <= 1) { return 1; } return fibonacci(num - 1) + fibonacci(num - 2); } var series = []; for (var i = 0; i < 10; i++) { series.push(fibonacci(i)); } console.log(series);
I am trying to populate the kendo panel control using the below json
var jsondata = { "Heading 1":
[{ "ID": 1, "Name": "TEST 1" }, { "ID": 2, "Name": "TEST 2" },
{ "ID": 3, "Name": "TEST 3" }, { "ID": 4, "Name": "TEST 4" },
{ "ID": 5, "Name": "TEST 5" }, { "ID": 6, "Name": "TEST 6" },
],
"Heading 2":
[{ "ID": 1, "Name": "TEST 1" }, { "ID": 2, "Name": "TEST 2" },
{ "ID": 3, "Name": "TEST 3" }],
"Heading 3": [{ "ID": 1, "Name": "TEST 1" },
{ "ID": 2, "Name": "TEST 2" },
{ "ID": 3, "Name": "TEST 3" }] };
Heading 1, Heading 2, Heading 3 will be the heading of the panels and the "Name" will be the subitems
JS FILE :
$(document).ready(() => {
$("#pageLoader").hide();
$("#panelbar").kendoPanelBar();
var panelBar = $("#panelbar").data("kendoPanelBar");
$.each(Object.keys(jsondata), function (i, row) {
// trying to get all the names into an array
let array = new Array(Object.values(jsondata)[i].length);
$.each(Object.values(jsondata)[i], function (j, datarow) {
array[j] = Object.values(jsondata)[i][j].Name;
});
panelBar.append([
{
text: row,
items: ???
}
]);
});
});
Below are the things I have tried :
items : array (subitems are populated but they are shown as "undefined")
items : [{text : array }] (all the subitems are displayed as one item with comma separated values)
How are we supposed to give:
items : [{
text : "TEXT 1"
},
{
text : "TEXT 2"
}
]
I want to do the above thing but not hard code. In a loop or something.
I have the following script tags in my .NET framework file
<script src="~/Scripts/kendo2020/2020.3.1021/jquery.min.js"></script>
<script src="~/Scripts/kendo2020/2020.3.1021/kendo.all.min.js"></script>
<script src="~/Scripts/kendo2020/2020.3.1021/kendo.aspnetmvc.min.js"></script>
<script src="~/Scripts/kendo2020/2020.3.1021/jszip.min.js"></script>
<script src="~/Scripts/jquery.blockUI.js"></script>
<script src="~/Scripts/jquery.cookie-1.4.1.min.js"></script>
The JQuery version I am using is 3.5.1.
I have also added the following snippet under the WebConfig file.
<appSettings>
<add key="Telerik.ScriptManager.EnableEmbeddedjQuery" value="false" />
</appSettings>
When I run a security scan, it flags the aspnetmvc.min.js file with Client DOM XSS and Prototype Pollution vulnerabilities.
Is there a way to fix it?
Hello guys, I hope you are all well.
I have a question about the KendoUI version 2014.1.416 as I am facing some issues with the kendoSortable() function.
At the moment, the jQuery version is the latest (3.6.0) and I have also placed the latest jQuery Migrate version (3.2.2) but the .data("kendoGrid") function always returns an "undefined" result, meaning that it does not find the actual grid.
Do you happen to know whether the problem is the latest jQuery version or the syntax to get the kendoGrid?
Below I have placed the JS line of code to fetch the grid.
- code sample: var grid = e.detailRow.find(".js-filter-conditions-grid").data("kendoGrid");
Regards,
R
Hi
I have successfully used jQuery to get and use the Value from a Field embedded on the page's form ... this is triggered by an entry (Key 13) ... what I would like to do for a different page is wait for a Form Field to be in focus, then update the content of the Field then refresh the Page ... what I believe is going wrong with my attempt is I don't believe the dynamic page has been loaded before my script is attempting to change the value. The example I have basically fires once when the page supposedly finishes azar loading.
<pre hidden=""> <script> var xmlhttp = new XMLHttpRequest(); var apptype = "New Membership chatrandom Application"; xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { jQuery('#vfb-field-1916').focus(); jQuery('#vfb-field-1916').val(apptype); location.reload(true); }} </script>
</pre> [vfb id=42]
Hello,
In my solution, I use AngularJs and package @progress/kendo-ui@2018.2.704.
Today I updated the package to latest version and I encountered weird issue regards to kendo dropdownlist.
In place where we use brackets and property name like {{property}}, kendo instead of displaying property value shows {&zeroWidthSpace;{property}&zeroWidthSpace;}.
Does anyone know what was changed and produced that issue and how I can fix that?
I am developing an application for a school entrepreneurial project and am using:
kendo.timezones.min.js
kendo.silver.mobile.min.css
kendo.silver.min.css
kendo.common.min.css
kendo.all.min.js
in the web app. I am wondering if this is legal, as the app will be a subscription-based app so that users can pay for a subscription to use the app. I don't currently have a license or anything from kendo UI, so I am not sure if this is legal.
This is my first time using Kendo UI, so I am not sure how anything works!
Any help will be appreciated!
Hi,
I have a kendo toolbar with multiple dropdowns and checkboxes to filter my datasource. What I want is when I submit my filter selections, if a spesific checkbox is checked, then datetime column of the grid will have this template:
"#= kendo.toString(kendo.parseDate(dates), 'dd/MM/yyyy') #"
If the checkbox not checked (or the page is just loaded with empty checkbox in default scenario) the column will have:
"#= kendo.toString(kendo.parseDate(dates), 'dd/MM/yyyy HH:mm') #"
as template.
I tried conditioning inside of grid but I didn't manage to obtain checkbox value. I tried writing a function outside the grid function but when I refresh grid data with:
var grid = $("#grid").data("kendoGrid");
grid.dataSource.data(reportData);
it only refresh the data inside grid, that does not trigger the template function.
How can I change the column template while refreshing the data according to that checkboxs value?
Greets Umutcan