after upgrading to "2016.1.118" my code (see below) produce an "Uncaught TypeError: Cannot read property 'date' of undefined" when trying to access dataItem properties in chart.series.notes.label.template:
The code:
var devChart = $("#chart").kendoStockChart({ theme: "bootstrap", dataSource: chartDs, dateField: "date", series: [{ type: "line", style: "smooth", field: "pct", noteTextField: "date", // keep, however overruled by label.template notes: { position: "bottom", icon: { visible: false }, label: { color: "white", border: { dashType: "dash" }, background: "#777", rotation: -90, position: "inside", template: "#:kendo.toString(category, 'dd-MMM-yyyy')#" // this code works in "2016.1.118" version //template: "#:kendo.toString(dataItem.date, 'dd-MMM-yyyy')#" // this code worked in pre-"2016.1.118" version } } }], ...
My dataset:
[{"rId":6789,"date":"2015-05-06T12:28:33.643+02:00","max":160.00,"score":140.0,"pct":88.0,"survey":"survey 1"},{"rId":7228,"date":"2015-05-29T11:14:42.047+02:00","max":160.00,"score":150.0,"pct":94.0,"survey":"survey 1"},{"rId":9590,"date":"2015-08-11T13:53:27+02:00","max":160.00,"score":160.0,"pct":100.0,"survey":"survey 1"},{"rId":12770,"date":"2015-10-02T10:53:55+02:00","max":160.00,"score":140.0,"pct":88.0,"survey":"survey 1"},{"rId":14890,"date":"2015-10-28T12:41:27+01:00","max":160.00,"score":140.0,"pct":88.0,"survey":"survey 1"},{"rId":16222,"date":"2015-11-06T13:12:12+01:00","max":365.00,"score":365.0,"pct":100.0,"survey":"survey 2"}]
I want to check out the new Dashboard app template, but I'm having trouble finding it. I upgraded UI for ASP.NET MVC to Q1 2016 using Telerik Control Panel. It is installed in the C:\Program Files (x86)\Telerik folder. When I couldn't find the template there, I also installed Kendo UI Professional (including examples). I found this blog that speaks of an apptemplates folder, but I'm not seeing that in my installation. Were the templates moved somewhere else in this release?
Thanks.
Kendo Q3 2015, asp.net mvc
I have the scenario where I'm binding columns to nullable objects. I'm using the client template, and have a little html to add if the value is not null.
I've simplied my code here. "ChildObject" is a property that can be null. If it is null, show nothing. If it is not null, show ChildObject.Name (in some custom html)
columns.Bound(c => c.ChildObject.Name).Title("Some Column") .ClientTemplate( "#= (ChildObject == null) ? ' ' : '<div>' + ChildObject.Name + '</div>' #" ) .Width(100);This code throws the invalid template error. If I remove the '+'s, it works fine. Example: '<div>Hello</div>' works, however that wouldn't allow me to add databound text.
Thanks
@(Html.Kendo().Grid<MaterialEstimateQuantityApplicationModel>() .Name("MaaterialEstimateQuantityApplicationGrid") .Columns(columns => { columns.Bound(p => p.Amount); columns.Bound(p => p.QuantityAmount); columns.Bound(p => p.MaterialMarkup); columns.Bound(p => p.UnitPrice); columns.Bound(p => p.Total); columns.Bound(p => p.MaterialEstimationId).Visible(false); columns.Bound(p => p.ItemQuantityId).Visible(false); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) //.Pageable() .Navigatable() //.Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .Batch(true) .PageSize(20) .ServerOperation(false) .Events(events => events.Error("error_handler")) .Model(model => model.Id(p => p.Id)) .Read("EditingLaborItemsCreate_Read", "Estimate", new { estimateId = Model.EstimateId }) .Update("EditingLaborItemsCreate_Update", "Estimate") .Create("EditingLaborItemsCreate_Create", "Estimate") ).I am adding items on client with url parameter set:
var item = this.links.append({ text: text, url: url }, parent);
//http://docs.telerik.com/kendo-ui/api/javascript/ui/treeview#methods-appendThe generated code is:
<li role="treeitem" class="k-item" data-uid="64c022e1-c7c4-470e-8dab-a5f821290894" aria-selected="false " id="menuitems-admin_management_database"> <div class="k-top"> <a class="k-in k-state-focused" href="#!/admin/management/database">Database</a> </div></li>I would expect that k-link class is also added to the a tag, otherwise this happens.(On some themes text is not visible)
Hi I have a simple multiselect....
<select id="msProducts" multiple style="width:100%;"></select>
$(document).ready(function () {
//products multi-select
$("#msProducts").kendoMultiSelect({
placeholder: "Select Product(s)",
dataTextField: "ProductNameText",
dataValueField: "ProductNameValue",
dataSource: {
type: "json",
serverFiltering: true,
transport: {
read: {
url: "Home/Products"
}
}
}
});
});
My Contoller has:
'GET: Home/Products
<HttpGet>
Function Products() As JsonResult
Dim DiaryProductList As List(Of ProductsModel) = ProductsModel.GetProducts
Return Json(DiaryProductList , JsonRequestBehavior.AllowGet)
End Function
My ProductsModel Class has:
Public Class ProductsModel
Public Property ProductNameText As String
Public Property ProductNameValue As String
Public Shared Function GetProducts() As List(Of ProductsModel)
Dim ProductList = New List(Of ProductsModel)
Dim dc As New DBDataContext
Try
Dim ProductsQuery = (From pIn dc.Products
Where p.ProductStatus <> "discontinued"
Select New With {.ProductNameValue = p.ProductName,
.ProductNameText = p.ProductName}).OrderBy(Function(lst) lst.ProductNameValue)
For Each r In ProductsQuery
ProductList.Add(New ProductsModel() With {.ProductNameValue = r.ProductNameValue,
.ProductNameText = r.ProductNameText})
Next
Catch ex As Exception
ProductList.Add(New ProductsModel() With {.ProductNameValue = "",
.ProductNameText = ex.Message})
Finally
dc.Connection.Close()
End Try
Return ProductList
End Function
End Class
My problem is that although the muti-select gets populated (with some 5000+ products) the dropdown is not filtering as a user types. For example if I beging typing the word CAKE. As soon as I type C the I-beam disappears and after a second or two the dropdown drops for a brief moment and the disappears clearing the multi-select completely. The only way I can populate at the moment is type the letter A, wait and then scroll through the complete list and select what I need for each item I need. Have I missed something. Should I introduce paging in order to limit the data?
Thanks
I am trying to export a grid to excel. There is a column group which might have any number of columns depending on configuration. The issue is when i export the grid, i am not able to see the values of the column names instead i see variable names. attachments show what i mean. please help me!
this is what i used in my view.
.ToolBar(tools => tools.Excel())
.Excel(excel => excel
.FileName("Kendo UI Grid Export.xlsx")
.Filterable(true)
)
I have a basic editor that I need to check for content. If empty I will generate error. My code to check for empty is:
var dropdownlist = $("#addNew_dTeam").data("kendoDropDownList");
if (dropdownlist.value() == "") {
validFlag = false;
errorMsg = "<li>Select Team</li>"
}
dropdownlist = $("#addNew_dType").data("kendoDropDownList");
if (dropdownlist.value() == "") {
validFlag = false;
errorMsg += "<li>Select Entry Type</li>"
}
var multiSelect = $("#msServers").data("kendoMultiSelect");
if (multiSelect.value() == "") {
validFlag = false;
errorMsg += "<li>Add at least one Server or select N/A</li>"
}
var editor = $("#diaryComments").data("kendoEditor");
if (editor.value() == "") {
validFlag = false;
errorMsg += "<li>A comment is mandatory</li>"
}
Hi there,
I was wondering whether it was possible to use a specific CSS depending on the browser a user is using? If so, how is that achieved?
For example, I currently have a stylesheet (let's call it stylesheet A) that specifically styles Internet Explorer 8, I have another stylesheet (stylesheet b) that styles Internet Explorer 11. How would I be able to get stylesheet A to be read and applied to IE 8 and Stylesheet and applied to IE 11? Do I just use something like:
if (kendo.support.*) { // Do something }Thank you in advance!