
Hi,
I am binding Kendo Grid with SharePoint Rest Api. The SharePoint List contains a Column that facilitates rich textbox features(formatting features). While displaying content on Kendo Grid i have set "encoded : false" property, this makes it perfect in grid. But when i try to export content to excel it exports html tags into excel. Can any one help me with this?
thanks in advance.

Hi All,
I have a bar chart which has month's in the category axis and 2 metrics in the other axis. The problem which I am facing is that the month data are not aggregating.
Here is the code which have.From this,it is clear that am getting extra "Jan" at the category axis which don't want.I want that value to be aggregated in the same "Jan" which is present first. How can achieve this?
Kindly help me fix this.
<!DOCTYPE html>
<html>
<head>
<base href="http://demos.telerik.com/kendo-ui/bar-charts/index">
<style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>
<title></title>
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.3.1028/styles/kendo.common.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.3.1028/styles/kendo.moonlight.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.3.1028/styles/kendo.moonlight.mobile.min.css" />
<script src="//kendo.cdn.telerik.com/2016.3.1028/js/jquery.min.js"></script>
<script src="//kendo.cdn.telerik.com/2016.3.1028/js/kendo.all.min.js"></script>
</head>
<body>
<div id="example">
<div class="demo-section0 k-content wide">
<div>
<button id="show_col1" class="k-button" clicked="true" > Total Visits</button>
<button id="hide_col1" class="k-button">Unique Visitors</button>
</div>
<div id="tabstrip">
<ul>
<li class="k-state-active">Quarterly</li>
<li>Monthly</li>
<li>Weekly</li>
</ul>
<div class="demo-section k-content wide">
<div id="chart"></div>
</div>
<div class="demo-section2 k-content wide">
<div id="chart2"></div>
</div>
<div> Weekly Content</div>
</div>
</div>
<script>
function createChart() {
$("#chart").kendoChart({
title: {
text: "Site Visitors Stats \n /thousands/"
},
legend: {
visible: false
},
seriesDefaults: {
type: "bar"
},
series: [{
name: "Total Visits",
data: [250000, 324000],
}, {
name: "Unique visitors",
data: [235000, 298000]
}],
valueAxis: {
max: 350000,
line: {
visible: false
},
minorGridLines: {
visible: true
},
labels: {
rotation: "auto"
}
},
categoryAxis: {
categories: ["Q1", "Q2", "Q3", "Q4"],
majorGridLines: {
visible: false
}
},
tooltip: {
visible: true,
template: "#= series.name #: #= value #"
}
});
$("#show_col1").on("click", function() {
var chart = $("#chart").data("kendoChart");
chart.options.series[1].visible = false;
chart.options.series[0].visible = true;
chart.refresh();
});
$("#hide_col1").on("click", function() {
var chart = $("#chart").data("kendoChart");
chart.options.series[0].visible = false
chart.options.series[1].visible = true;
chart.refresh();
});
}
function createChart2() {
$("#chart2").kendoChart({
title: {
text: "Site Visitors Stats \n /thousands/"
},
legend: {
visible: false
},
seriesDefaults: {
type: "bar"
},
series: [{
name: "Total Visits",
data: [56000, 63000, 74000, 91000, 117000, 138000,10000],
}, {
name: "Unique visitors",
data: [52000, 34000, 23000, 48000, 67000, 83000,10000]
}],
valueAxis: {
max: 140000,
line: {
visible: false
},
minorGridLines: {
visible: true
},
labels: {
rotation: "auto"
}
},
categoryAxis: {
categories: ["Jan", "Feb", "Mar", "Apr", "May", "Jun","Jan"],
majorGridLines: {
visible: false
}
},
tooltip: {
visible: true,
template: "#= series.name #: #= value #"
}
});
$("#show_col1").on("click", function() {
var chart = $("#chart2").data("kendoChart");
chart.options.series[1].visible = false;
chart.options.series[0].visible = true;
chart.refresh();
});
$("#hide_col1").on("click", function() {
var chart = $("#chart2").data("kendoChart");
chart.options.series[0].visible = false
chart.options.series[1].visible = true;
chart.refresh();
});
}
$(document).ready(function() {
$("#tabstrip").kendoTabStrip({
animation: {
open: {
effects: "fadeIn"
}
}
});
});
$(document).ready(createChart2);
$(document).bind("kendo:skinChange", createChart2);
$(document).ready(createChart);
$(document).bind("kendo:skinChange", createChart);
</script>
</div>
</body>
</html>
Thanks,
Lakshman
I've created a dojo here to demonstrate my question.
http://dojo.telerik.com/ikArE
When creating a set of functions under schema, model for a datasource and then refereing to them like "field: 'Functionname()'" in the columns for the grid, it appears to load correctly, but attempting to sort on by clicking the column header results in "d.Functionname" is not a function error.
Is this not supported or is there something else wrong?
Hi,
Whenever I try to use custom task template, the drag-handle automatically disappears, please help

Hi All,
I am using kendo grid row template where i have to add dynamic div based on the text.
Below is my code:
<script id="altRowTemplate" type="text/x-kendo-tmpl">
<tr class="k-alt" data-uid="#: uid #">
<td style="width:100%">
<div class="col-sm-1">
<img src="@Url.Content("~/Content/Images/#: OwnerImage#")" class="img-responsive" style="width:80px; height:50px" alt="1" />
</div>
<div id="Category">
#:changeTemplate(Category)#
</div>
</td>
</tr>
</script>
for the category in first row value is c# and second row value is: c#, Asp.Net, AngularJs
for change template below is the script function used.
function changeTemplate(category) {var splitCategory = category;var setCategorySpan = '';if (splitCategory.indexOf(',') !== -1) { splitCategory = category.split(',');for (var i = 0; i < splitCategory.length; i++) {var setcolID = 2;// Trim the excess whitespace. splitCategory[i] = splitCategory[i].replace(/^\s*/, "").replace(/\s*$/, "");// Add additional code here, such as: setCategorySpan += "<div class='col-sm-" + setcolID + "'><span class='tags' style='font-family:arial; font-size:small'>" + splitCategory[i] + "</span></div>"; setcolID+=2;} $("#dvCategory").append(setCategorySpan);}else { setCategorySpan = "<div class='col-sm-12'><span class='tags' style='font-family:arial; font-size:small'>" + splitCategory + "</span></div>"; $("#dvCategory").append(setCategorySpan);}}
in this function i am checking if value is seprated by comma then split one by one value and add in span tag and that tag should append in div.
i have checked through debug if i am directly appending value to div so this div is no more there, for that purpose i am creating this div in document ready function only:
var container = document.createElement('div'); container.setAttribute('id', 'dvCategory'); container.setAttribute('class', 'row');
if i am using here $('body').append(container);
value is showing but out of grid.
can i get help to set div on the same position where category is there?