or
var customersSource = new kendo.data.DataSource({ transport: { read: { url: "http://....", dataType: "json" } }, schema: { data: "data" }, requestEnd: function (e) { this.cols = e.response.columns; } });$scope.mainGridOptions = { dataSource: customersSource, // OK columns: customersDataSource.cols, // undefined - uses default height: 500, scrollable: true, selectable: true };{ "data": [ { "id": 0, "firstname": "Dalton", "lastname": "Holden", "gender": "male", "email": "daltonholden@tellifly.com", "phone": "871-407-2973", "address": "22 National Drive, Brenton, Louisiana", "birthday": "21/04/1965", "currency": "GBP" }, { "id": 1, "firstname": "Allyson", "lastname": "Odom", "gender": "female", "email": "allysonodom@tellifly.com", "phone": "922-548-2725", "address": "44 Quincy Street, Thynedale, Georgia", "birthday": "28/08/1961", "currency": "CHF" }, { "id": 2, "firstname": "Sweet", "lastname": "Branch", "gender": "male", "email": "sweetbranch@tellifly.com", "phone": "880-593-2244", "address": "81 Fenimore Street, Veguita, Missouri", "birthday": "08/08/1953", "currency": "AUD" } ], "columns": [ { "field": "firstname", "title": "Frist Name", "width": 200, "attributes": { "class": "", "style": "text-align: left;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: left;" } }, { "field": "lastname", "title": "Last Name", "attributes": { "class": "", "style": "text-align: left;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: left;" } }, { "field": "gender", "title": "Gender", "attributes": { "class": "", "style": "text-align: left;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: left;" } }, { "field": "email", "title": "e-mail", "attributes": { "class": "", "style": "text-align: left;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: left;" } }, { "field": "phone", "title": "Phone Number", "attributes": { "class": "", "style": "text-align: right;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: right;" } }, { "field": "address", "title": "Address", "attributes": { "class": "", "style": "text-align: left;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: left;" } }, { "field": "birthday", "title": "Birthday", "attributes": { "class": "", "style": "text-align: center;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: center;" } }, { "field": "currency", "title": "Currency", "attributes": { "class": "", "style": "text-align: center;" }, "headerAttributes": { "class": "table-header-cell", "style": "text-align: center;" } } ]}Thanks.
var Animal = kendo.Class.extend({ getClassName: function() { console.log(???); //to get Animal }});var Bird = Animal.extend({ getClassName: function() { console.log(???); //to get Bird }});
<! DOCTYPE html><html><head> <title>Pagina de prueba</title><link rel="stylesheet" type="text/css" href="styles/kendo.blueopal.min.css"><link href="styles/kendo.common.min.css" rel="stylesheet" type="text/css"><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/kendo.web.min.js"></script><script type="text/javascript" src="js/cultures/kendo.culture.es-ES.min.js"></script><script type="text/javascript"> $(function() { kendo.culture("es-ES"); var categorias = new kendo.data.DataSource({ transport: {read:"categorias_usuarios.php"} }); var datos= new kendo.data.DataSource( {transport: {read: "datos_grid.php",create: {url: "create_data.php",type: "POST"},update:{ url: "update_data.php", type:"POST"}, destroy:{ url: "delete_data.php", type:"POST"}},error: function(e) { alert(e.responseText); },schema: {data: "data",total: function(result) { var data = this.data(result); return data ? data.length : 0 },model: {id: "cod_maestros",fields: {id: {nullable:true,editable:false},nombres_usuarios: {validation: {required: true}},apellidos_usuarios: {validation: {required: true}},cod_nivel_usuario:{field:"cod_nivel_usuario"}}},pageSize: 5,batch: true}} ); var grid = $("#grid").kendoGrid({dataSource:datos ,columns: [{title: "Nombres del Usuario",field: "nombres_usuarios",type: "text"}, {title: "Apellidos del Usuario",field: "apellidos_usuarios",type: "text"}, {title: "Nivel", field: "cod_nivel_usuario",values:categorias}, {command: ["edit", "destroy"],title: " ",width: "210px"}],pageable: {refresh: true,pageSizes: 5},toolbar:[{name:"create",text:"Agregar nuevo registro"}, {template: kendo.template($("#template").html())}],editable: "inline"}); $("#category").keyup(function() { var value = $(this).val(); if (value) { grid.data("kendoGrid").dataSource.filter({logic: "or",filters: [{field: "nombres_usuarios",operator: "contains",value: value}, {field: "apellidos_usuarios",operator: "contains",value: value}]}) } else { grid.data("kendoGrid").dataSource.filter({}) } });});</script></head><body><div id="grid"></div><script type="text/x-kendo-template" id="template"> <div class="toolbar" style="display:inline-block"> <label class="category-label" for="category">Buscar:</label> <input type="text" id="category" style="width: 230px"> </div> </script> </body></html
if (c != null){ var Country = $("#CountryForPricing").data("kendoDropDownList"); alert(c); Country.select(function (dataItem) { return dataItem.Value == c; } ); CatalogPricingSetProgramExRate(c); }