We are using bar charts and were looking into ways to customize
the series notes.
Unfortunately, the series/ seriesdefault notes are not able to
handle HTML – the entire widget disappears.
The tooltip is able to handle them.
We have investigated a number of ways using the latest Kendo
library:
- Setting the template as a string
- Setting the template as a function returned by a kendo.template
- Using kendo.htmlEncode
We have a working example of the tooltip: https://jsfiddle.net/gmL0b1f6/
The goal is to create a series note in the style of the example
tooltip.
Any help much appreciated.
Kind regards.
Using the kendo example for angular (http://demos.telerik.com/kendo-ui/grid/angular).
I have a simple kendo ui grid setup (kendo ui and angularjs) with a detail template that retrieves the data properly for the detail template (can see the correct data returned in the browsers developer console, attached as screenshot ) ,
<div>
<div
kendo-grid
options="homeGridOptions">
<div k-detail-template>
<div kendo-grid options="detailGridOptions(dataItem)">
</div>
</div>
</div>
</div>
and in the angular controller
$scope.homeGridOptions = {
dataSource: $scope.userchartsDS,
sortable: true,
pageable: true,
dataBound: function() {
this.expandRow(this.tbody.find("tr.k-master-row").first());
},
columns: [
{
field: "chartno",
title: "Chart"
}
]
};
$scope.chartsDS = new kendo.data.DataSource({
transport: {
read: {
url: "http://site.local/api/v1/index.php/user/home",
dataType: "json"
}
}
});
$scope.detailGridOptions = function(dataItem) {
return {
dataSource: {
type: "json",
transport: {
read: "http://site.local/api/v1/index.php/products/chart/" + dataItem.chartno + "/20100101/20150515"
},
filter: { field: "PRODUCT_NAME", operator: "eq", value: dataItem.chartno }
},
scrollable: false,
sortable: true,
pageable: true,
columns: [
{ field: "PRODUCT_NAME", title:"chart", width: "56px" },
{ field: "VERB_CODE", title:"verb code", width: "110px" },
{ field: "PRODUCT_REF_EN", title:"product" },
{ field: "VERB_NAME_EN", title: "Verb", width: "190px" }
]
};
};
}]);
but the detail template is not populating with the data. I can see in batarang this information for the detail grids model
{ column:
{ encoded: true
hidden: null
field: PRODUCT_NAME title: Chart
width: 56px
template: #: data.PRODUCT_NAME # } }
Do I need to explicitly inject the detail template data source array value into the angular scope, it did not appear to be necessary in the example?
We're using server-side filtering, signal R, Kendo.DynamicLinq ToDataSourceResult, etc.
It applies the grid filters to the IEnumerable brilliantly, except the string comparisons are all case-sensitive. We need these string filters to be case insensitive.
I've uploaded a screenshot of the relevant area of the server-side code. Please advise!
Thanks,
Andrew
I've figured out how to write a custom sort for a column using:
1.sortable: {2. compare: function(a, b) {3....However, if I group a field, it doesn't seem to be using the custom sort. Am I doing something wrong or is this not a feature that is currently available?
Thanks.
I am using Scheduler control from Kendo. I am trying to render daily capacity (Hard coded 30% now) in header of each day as shown in below screen. How can I replace hard coded by data from datasource?
Here is the code I have used. I have HARD CODED 30% in below code
<!DOCTYPE html><html><head><style>html { font-size: 12px; font-family: Arial, Helvetica, sans-serif; }</style><title></title><link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.common-material.min.css" /><link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.material.min.css" /><link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.dataviz.min.css" /><link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.dataviz.material.min.css" /><link rel="stylesheet" href="http://cdn.kendostatic.com/2015.1.429/styles/kendo.default.mobile.min.css" /><script src="Scripts/jquery.min.js"></script><script src="Scripts/kendo.web.min.js"></script><script> $(function () { $('#scheduler').kendoScheduler({ date: new Date("2013/09/02"), dateHeaderTemplate: kendo.template("<u>#=kendo.toString(date, 'dd/M')#</u> - (30%)"), }); });</script></head><body> <div id="scheduler"></div>/body>
Now, I will be getting 'percentage' from API, and want to set to datasource, and from datasource i want to render it to header
var datasource = new kendo.data.SchedulerDataSource({ data:Model.recordCollection // setting data});scheduler.setDataSource(datasource);but this datasource is calendar event related, this will not contain the daily capacity. so how do I set daily capacity data from different datasource? Multiple datasource supported?
I'm trying to use a grid control with my own custom editor for one of the columns.
The idea is that when that cell is clicked a separate pop-up window (modal ) is launched that contains a whole load of buttons, clicking on one of those buttons will close the pop-up and put the result of the selection into the cell that was clicked. (see attached screenshot for a better idea)
I'm new to kendoUI and javascript in general, and while I've managed to cobble something together that returns the selected value from the pop-up (into a global variable) I'm a bit stumped as to how to then update the edited cell with the new value. I've tried holding a reference to the selected data item in the grid and setting values there as a result of the button press, but the further I go down this path of trying to force the values in the more I'm sure that I'm working completely against the kendo grid framework and wanted to see what recommendations people had for achieving this sort of functionality.
Thanks,
Hello,
i've got a problem with persisting the state of a grid.
kendo.stringify($scope.grid.getOptions())Templates of columns will only be exported if they are defined as strings, external templates or template functions, are ignored.
Is there a proper way to get this working?
Works:
template: '#: (DeliverDateType) ? DeliverDateType.name : "" #',Doesn't work:
template: kendo.template($("#colProductionJobValue").html()),template: function (data) { var numbers = []; for (var i = 0; i < data.ProductionJob.length; i++) { if (typeof data.ProductionJob[i].id != 'undefined') { numbers.push(data.ProductionJob[i].id); } } return numbers.join(', ');},