Hi,
We are moving our javascript files to typescript for a number of reasons, but one issue that I have is the calling of this.dataitem whilst inside a class, because the this object refers to the class rather than the calling object.
The current code that was inside the partial is
function onSelect(e) {
var dataItem = this.dataItem(e.item.index());
window.document.getElementById($('summary').val()).innerHTML = dataItem.Summary;
window.document.getElementsByName($('#id').val())[0].value = dataItem.Id;
}
the code in the typescript class is
namespace myNamespace{
export class myClassObject
... other methods
onSelect(e) {
var dataItem = this.dataItem(e.item.index()); // This is the line that I am having issue with because of 'this'
(window as any).document.getElementById(this.spnSummary).innerHTML = dataItem.Summary;
(window as any).document.getElementsByName(this.nameOfIdField)[0].value = dataItem.Id;
}
}
}
The Razor that is calling this is (minus bits that are not necessary to this question
@(Html.Kendo().AutoComplete()
.Name(Model.Name)
...
...
.Value(Model.Value)
.Events(e => e.Change("onChange").Select("onSelect")) // <=== these are the methods I need to call.
I am going to need to do this on a number of items in the site, so any and all help would be gratefully received.
Hi!
I'm having a hard time using the jQuery spreadsheet to give me a date value in javascript.
after a button click I need to get the value of a cell as a date object. However the range.value() returns a number (not epoch or milliseconds.)
//set the valuecurrentSpreadsheet.activeSheet().range("A1").value(new Date('01/01/2018')) // no problem herevar cellValue = currentSpreadsheet.activeSheet().range("A1").value() // in this case, cellValue returns 43101. I need the date. (01/01/2018 in this case)
How do I convert cellValue to a javascript date?? ... or how do I access the cell so it gives me the date value? I'm not familiar how to convert this number to a Date object.
Cell definition (all of this works fine. I only want to get the value and convert it to date):
{format: kendo.culture().calendar.patterns.d,transform : function(val){ if (!val) return ''; return (new Date(val)); }validation :{ dataType: "date", showButton: true, comparerType: "between", from: 'DATEVALUE("1/1/1900")', to: 'DATEVALUE("1/1/2100")', allowNulls: !esRequerido, type: "reject", titleTemplate: " bla bla", messageTemplate: "Bla bla" }
Any help will be appreciated.
Armando

Official documentation stays that Kendo UI is compatible with JQuery 3.1.1. However on scheduler there are still issues with that, see example:
https://dojo.telerik.com/AmeGiHAV
server filtering is not working when using JQuery 3.1.1.The view is not available because of Deferred changes in JQuery.
Hi, in the following code I am using a sample grid, setting the rowTemplate, altRowTemplate and detailInit properties.
I tested these code with 2016.3.914 in Dojo and the detail button of grid doesn't work.
The versions in next list we show where code works and not.
2018 R1 SP1 - 2018.1.221 DOESN'T WORK
2016 R3 SP1 - 2016.3.1028 DOESN'T WORK
2016 R3 - 2016.3.914 DOESN'T WORK
2016 R2 SP2 - 2016.2.714 WORKS WELL
2016 R2 SP1 - 2016.2.607 WORKS WELL
2016 R2 - 2016.2.504 WORKS WELL
Currently I updated to 2016.3.914 version so the grid doesn't work.
Could are you tell me why does that occur? and How could I solved this problem?
<div id="grid"></div> // 2018 R1 SP1 - 2018.1.221 DOES NOT WORK // 2016 R3 SP1 - 2016.3.1028 DOES NOT WORK // 2016 R3 - 2016.3.914 DOES NOT WORK // 2016 R2 SP2 - 2016.2.714 WORKS WELL // 2016 R2 SP1 - 2016.2.607 WORKS WELL // 2016 R2 - 2016.2.504 WORKS WELL var parentObj = this,rowTemplateString = '<tr class="k-master-row row" data-uid="#: uid #">' + '<td class="k-hierarchy-cell"> '+ '<div class="baseBttn button-expand-schedules #:DeactivatedAll === "0/0" ? '+ ' \"iconGreyBttn disabledBttn\" : \"iconYellowBttn\"#"><a class="k-icon k-plus" tabindex="-1"></a>'+ '</div> </td>' + '<td>#: name #</td>' + '<td>#: DeactivatedAll #</td>' + '</tr>'; var altRowTemplateString = rowTemplateString.replace('tr class="', 'tr class="k-alt '); $("#grid").kendoGrid({ columns: [ { field: "name" }, { field: "Deactivated"} ], rowTemplate: rowTemplateString, altRowTemplate: altRowTemplateString, dataSource: [ { name: "Beverages", DeactivatedAll: "0/0", products: [ { name: "Tea" }, { name: "Coffee" } ] }, { name: "Food", DeactivatedAll: "1/1", products: [ { name: "Ham" }, { name: "Bread" } ] } ], detailTemplate: 'Products: <div class="grid"></div>', detailInit: function(e) { e.detailRow.find(".grid").kendoGrid({ dataSource: e.data.products }); }});
Thanks.

Hi,
I have a DateTime Picker, but when click, only shows time, not calendar for date show up.
This is the script:
$("#ItemAuctionDetail_dpScheduleTime").kendoDateTimePicker({ format: "yyyy/MM/dd HH:mm" });
The screenshot is attached.
Please help me to solve the problem.
Thanks,

Hello, I'm new to Telerik and I wanted to know how I could create a filter pop up with both multi check box filter with the default filter below it. After browsing some examples, I know we can customize a filter for a particular column
filterable: { ui: function(element){ element.<kendo library>{} }}This only allows one filter mechanic, I was looking for functionality something similar to RadGridView for Silverlight like the image attached.
How could I customize my filter pop up to work with two filter mechanics?
Thanks,
C
Hi.
I use the Kendo UI Custom Download whenever I download a new version of the Kendo UI, or need to add a specific component to my custom kendo package.js
This normally happens once every 6 months or so, and it is always a pain because I never remember what components I need to check in the configurator before downloading. There are "hundreds" of checkboxes to tick, and I don't remember all features I selected the last time I downloaded my package.
Is there a way to store this setup on my userprofile, so I can restore this the next time (in 6 months when e.g a new version is available) I visit your webpage?
I'm finding that when I call .kendoWindow on $("#window"), the #window div is moved to the end of the body
<form> <div id="window"> <input type="text" name="partOfMyForm" /> </div></form>
But what if the contents of the window are inputs that belong to the form and need to be submitted with it? Is there a way to leave the window element inside the form element?

Hi,
I need help with my Kendo Editor.
The tool bar is invisible and not functioning. Here is the script:
$("#ItemAuctionDetail_editItemDescription").kendoEditor({
resizable: {
content: true,
toolbar: true
}
});
The screenshot of the page is attached.
Please help me to figure out.
thanks.
