or
{
datasetA : [], datasetB: [], success: true}datasource.change: function(){ oDataA = new kendo.data.DataSource(this, {schema: {data: "datasetA"}}); $("#gridA").data("kendoGrid").setDataSource(oDataA); oDataB = new kendo.data.DataSource(this, {schema: {data: "datasetB"}}) $("#gridA").data("kendoGrid").setDataSource(oDataB);}{ data : [{ datasetA : [], datasetB: [] }] success: true}datasource.change : function(){ $("#gridA").data("kendoGrid").setDataSource(this.at(0).datasetA); $("#gridB").data("kendoGrid").setDataSource(this.at(0).datasetB);}<!DOCTYPE html><html><head> <meta charset="utf-8"> <title>Kendo UI Snippet</title> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.common.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.rtl.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.default.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.dataviz.default.min.css"> <link rel="stylesheet" href="http://cdn.kendostatic.com/2014.2.716/styles/kendo.mobile.all.min.css"> <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://cdn.kendostatic.com/2014.2.716/js/kendo.all.min.js"></script></head><body> <div id="parentDiv" style="position:relative;width:400px;height:400px; background-color:red"> <div id="childDiv" style="position:relative;width:150px;height:150px; background-color:blue"> </div> </div><script> kendo.ui.progress($('#parentDiv'), true); kendo.ui.progress($('#childDiv'), true); setTimeout(function() { kendo.ui.progress($('#parentDiv'), false); }, 1500); setTimeout(function() { kendo.ui.progress($('#childDiv'), false); }, 10000);</script></body></html>I have a Kendo Grid with a column that displays a persons name. I want the person's name to be a link and when clicked calls some javascript passing the name as a parameter. However I receive an error when I attempt to call this function with a string parameter, numeric paramters are ok. The code is as follows:
<div id="grid"> @(Html.Kendo().Grid(Model.clients) .Name("Search_grdResults") .Columns(columns => { columns.Bound(client => client.Hcn); columns.Bound(client => client.Hcn).ClientTemplate("<a onclick=showTest('#=FullName#')>#=FullName#</a>"); }) .Pageable() .Sortable() .DataSource(dataSource => dataSource .Ajax() .PageSize(5) .Read(read => read.Action("GetClients", "ClientLookup")) ) ) </div>The javascript is a simple alert just for testing purposes for now:
function showTest(fullname) { alert(fullname); }public class EnkelOppervlakteRow{ public int FosfaattoestandId { get; set; } public string Omschrijving { get; set; } [DisplayFormat(DataFormatString="{0:n3}", ApplyFormatInEditMode=true)] public decimal Oppervlakte { get; set; } public int? Id { get; set; }}@(Html.Kendo().NumericTextBoxFor(mdl => mdl.Oppervlakte))@(Html.Kendo().NumericTextBoxFor(mdl => mdl.Oppervlakte) .Format("N3"))