I am trying to load the grid state from the json that is saved when saving grid state. I am using `JSON.parse(text)` text being my json. The actual code works everywhere else but the unexpected token # in json is causing issues.
This is the specific area that is causing the issue
columns.Template(@<text> </text>) .Title("Actions") .ClientTemplate( "<a href='" + @Url.Action("EditTime", "TimePunches", new { id = "#=ID#", flt = @ViewBag.FLT }) + "' title='Edit'><i class='icon-edit fa fa-pencil fa-fw fa-lg'></i></a>" + "<a href='" + @Url.Action("PunchLogIndex", "TimePunches", new {id = "#=ID#", flt = @ViewBag.FLT}) +"' title='Punch Log'><i class='icon-purple fa fa-book fa-fw fa-lg'></i></a>" + "<a href='" + @Url.Action("PunchRequestIndex", "TimePunches", new { punchId = "#=ID#", flt = ViewBag.FLT }) + "' title='See Change Request Log'><i class='icon-niagara fa fa-list fa-fw fa-lg'></i></a>" + "<a href='\\#' id='delete' data-id='#=ID#' data-client='#=ClientID#'><i class='icon-red fa fa-times fa-fw fa-lg'></i></a>").Width(150).HeaderHtmlAttributes(new { @class = "header-center" });
It's my understanding that the razor text attributes are not liked when loading grid state. Is there a way to load this template in after the fact?

I am having trouble with some Site CSS box-sizing interfering with the Kendo DatePicker.
The problem is some standard CSS is globally applied to all text inputs with the following CSS:
input[type="text"], input[type="password"] { border-color: #cdcdcd; border-style: solid; border-radius: 3px; border-width: 1px; border-radius: 3px; height: 32px; padding: 8px 8px 8px 8px; box-sizing: border-box; /* Remove this, date picker displays ok but text box too big */ }This causes a grey line to appear at the bottom of the DatePicker which I want to get rid off. The problem seems to stem from the box-sizing css property above. Remove this, the grey area is removed. However, the text input appears too big.
I have prepared a Dojo example for this:
http://dojo.telerik.com/@andez2000/eHEZA/17
Any help is appreciated
We are migrating our application from the ASP.NET AJAX Grid, where we had the PageCount in the Pager-Message as stated here:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/functionality/paging/changing-the-default-pager/using-pagertextformat
{1} is total number of pages.
Unfortunately, the Pager of the Kendo Grid does not support the PageCount.
http://docs.telerik.com/kendo-ui/api/javascript/ui/pager#configuration-messages.display
Is there any workaround to get the pageCount in the pager?
i'm new with kendo-ui and mvc.
how can i implement a parent-child structure in kendo-grid with expand/collapse behavior?
we are currently using kendo-ui 2013.
hoping for your kind help.
thank you in advance.
hi,
I am opening an kendo window using the below jquery function.
However I need to pass __RequestVerificationToken to the MVC Controller because I am having "ValidateAntiForgeryToken" Attribute.
However, I am not able to pass it. Can you please suggest how to pass __RequestVerificationToken while opening an kendoWindow
function OpenTest() {
var url = '@Url.ActionWithArea("OpenTest", "Test", GlobalConst.AREA_EL_ElectiveEB)';
url += "?test=" +$("#test").val() +
"&test1=" +$("#test1").val();
windowElement = $('<div id = "abc" />').kendoWindow({
title: 'test',
content: url,
modal: true,
resizable: false,
draggable: false,
width: 900,
height: 400,
close: function () { windowElement.destroy(); }
}).data("kendoWindow").center().open();
return false;
}
I'm using the example from http://docs.telerik.com/kendo-ui/controls/data-management/grid/how-to/Editing/custom-delete-confirmation-dialog. From what I can see, the code appears almost identical, but when I click the delete command the default javascript dialog is still shown then the kendo.confirm(). If I then disable the confirmation using confirmation: false in the editable {}, the default confirmation dialog is not shown, but the destroy event is triggered before the kendo.confirm(). Is there a reason why I'm still getting the default confirmation dialog?
I've attached a gif screen capture of what I am seeing when clicking the delete command button.
var ds_addresses = new kendo.data.DataSource({ autoSync: false, transport: { create: { url: url('common/ax_add_address'), dataType: "json", type: "post" }, read: { url: url('common/ax_read_addresses/' + item.user_id), dataType: "json", type: "post", contentType: "application/json" }, update: { url: url('common/ax_update_address/' + item.user_id), dataType: "json", type: "post" }, destroy: { url: url('common/ax_delete_address'), dataType: "json", type: "post" }, parameterMap: function(options, operation) { if (operation !== "read" && options.models) { return {models: kendo.stringify(options.models)}; } } }, batch: true, serverPaging: false, serverSorting: false, serverFiltering: false, pageSize: 10, schema: { model: { id: "address_id", fields: { text: { editable: true, validation: { required: true } }, suburb: { editable: true, validation: { required: true } }, postcode: { editable: true, validation: { required: true, max: 9020 } }, postal: { type: "boolean", editable: true } } }, data: "data", total: "total" }, error: function (e) { //kendo.alert(e.errors.join("; ")); }}); $("div.client-addresses").kendoGrid({ dataSource: ds_addresses, scrollable: false, selectable: "row", sortable: false, pageable: false, toolbar: ["create"], columns: [ { field: "address_id", hidden:true }, { field: "text", title: "Address Text" }, { field: "suburb", title: "Suburb", width: "200px" }, { field: "postcode", title: "Postcode", width: "80px" }, { field: "postal", title: "Postal?", width: "90px", template: "#= postal ? 'Yes' : 'No' #" }, { command: [ {name: "edit", text: " ", template: "<a class='k-button k-grid-edit' href='' style='min-width:16px;'><span class='k-icon k-edit'></span></a>" }, {name: "delete", text: " ", template: "<a class='k-button k-grid-delete' href='' style='min-width:16px;'><span class='k-icon k-delete'></span></a>", click: function(e) { e.preventDefault(); //prevent page scroll reset var tr = $(e.target).closest("tr"); //get the row for deletion var data = this.dataItem(tr); //get the row data so it can be referred later kendo.confirm("Are you sure you want to delete this address record?").then(function () { grid.dataSource.remove(data) //prepare a "destroy" request grid.dataSource.sync() //actually send the request (might be ommited if the autoSync option is enabled in the dataSource) }, function () { //kendo.alert("You chose to Cancel action."); }); }} ], title: "Action", width: "118px" } ], editable: { mode: "inline" }, change: function(e) { var rows = this.select(); if(rows.length > 0) $('#selected-controls').show(); else $('#selected-controls').hide(); }, noRecords: { template: '<div style="margin:20px">No address records present.</div>' }});In my code I am using the Diagram to show a series of options to a user, in a hierarchical format. The data source gets its info from a web call, and the visual template is simply a rectangle and some text. I create the diagram with the following options:
layout: {
type: "layered"
},
connectionDefaults: {
selectable: false
},
editable: false,
click: selectFunc
The "selectFunc" simply sees if the click occurred on an item, and if so, sets a variable to that item for later retrieval.
What I want to be able to do is treat this diagram as single selection only. So, how do I:
1) Disable mouse selection rectangle? If you click and drag the mouse, a selection rectangle forms that will select all shapes it intersects.
2) Disable [CTRL]-Click, which allows multiple selection? In my selectFunc method, I undo the multiple selection and only select the last clicked on item, but the user still sees the multi-select action occur.
3) Make the diagram resizable? It seems if I do not specify an explicit width and height in CSS, the diagram will draw larger than the <div> it is contained within; and my attempts to use CSS to specify margins is also mostly ignored.
4) I utilize the "bringIntoView" method with a parameter of the first shape in the collection to make sure the diagram shows at least the first object in the hierarchy, but can I also specify to show it centered at the top of the available space?
Thanks in advance!

Is there any way to set the title in a Kendo Chart to an HTML template of some sort?
Basically I'm just looking to make the title of my Kendo Chart a link that will open another window. The version of the Kendo library we were using before had support for this functionality, but when updating to the most recent version of Kendo (2016.3.1118), I noticed that we lost this from when we were using the previous library.
Here's how I was declaring my chart title before.
$("#myChart").kendoChart({ title: { text: '<a onclick="openWindow();">' + myChartTitleVar + '</a>', color: "black" }, ...Using jQuery I did find a work around, however with how I have my chart set up, it refreshes every couple of seconds to display new data, so my title doesn't persist, and it ends up going back to the original title that displays as <a onclick="openWindow();">My Title</a> when viewed in my inspector in Chrome.
$("#myChart > svg > g > g:eq(1) > g > text").html('<a onclick="openWindow();">' + myChartTitleVar + '</a>');I have two dropdowns and a mvc kendo scheduler. I am trying to display the scheduler events based on two drop downs selections. Could you please help me? Here is the code
.DataSource(d=>
{
d.Model(m =>
{
m.Id(f => f.TaskID);
});
d.Read(read =>
{
read.Action("schedulerDisplay", "")
.Data("passParameters");
})
.ServerOperation(true);
})
<script>
function passParameters() {
return {
param1: $("#dropdown1").val(),
param2: $("#dropdown2").val()
};
}
</script>
