Hi,
I have my kendo upload widget (via angular) defined as:
<input name="files"<br> id="files"<br> type="file"<br> kendo-upload="uploader"<br> k-options="uploadOptions"<br> k-template="kendoTemplate()"<br> k-rebind="initialFiles"/>
I display all the files using initial files option. My objective is to continue to display the list of all files I get from server; once a given file is uploaded.
Because I have the rebind set on $scope.initialFiles; in onSuccess (I also tried onComplete)
I do:
<p>function onSuccess(e) {</p><p> $scope.initialFiles.length = 0;<br> populate();<br>}</p>
where the populate function uses $http service to get data and re-populate $scope.initialFiles...
This works fine with "drag and drop" functionality...but when I upload using the "Select..." button (I've renamed it to "Browse Files").. I get the error:
"Cannot read property 'get' of undefined"
It happens in kendo.min.js (appreciate this is minified code but pasting to give the context). I have marked the line that throws the error.
<p> function g(t, n, i, r, o, a, s) {<br> var l = n.$watch(o, function(o, c) {<br> var d, u, h, f;<br> t._muteRebind || o === c || (l(),<br> d = B[t.options.name],<br> d && d.forEach(function(t) {<br> var i = n.$eval(s["k" + t]);<br> i && r.append(e(i).attr(kendo.toHyphens("k" + t), ""))<br> }),<br> u = e(t.wrapper)[0],<br> h = e(t.element)[0],<br> f = i.injector().get("$compile"), //**** this line throws the error<br> t._destroy(),</p><p></p>I need to rebind the widget because after the upload; if I do not do $scope.initialFiles.length = 0;I do not get the current status of files. For example: if the user uploaded text.txt and then in order to overwrite the existing test.txt; reuploaded the same file - although its overwritten on the server - the UI continues to show two instances of text.txt.
How can I best; re-create the upload widget after the upload finishes (note I get the same error with onSuccess and onComplete) so that the list of files shown is only what's in $scope.initialFiles and fix the error I am getting now. The impact of error is that the widget does not get recreated...
Thanks a lot,
Labhesh
I know this issue has been brought up a number of times, and the generally accepted method of dealing with it is to add some code that causes the grid content height to be increased and the grid to scroll up. My situation is slightly different because we do not use the scrollbar, but instead, have the grid take up as much room as needed. The user then uses the browser's scrollbar to reach the bottom of the grid. We do, however, include pagination at the bottom.
So, I have tried using the approach where the sizing is changed as recommended. This gives me the height I need. There are two issues that have come up, though.
The first is that I am unsure when to add the focusout event handler. If I add it as part of the dataBinding or dataBound events on the grid, then I end up with this event being called multiple times if the user decides to resort the data in the grid, etc. If I add it during the $onInit method in my component (I'm using Angular), then it throws an error because there is no data in the grid. Where do you recommend adding this handler?
The second is that once an error has occurred, the additional space is now part of the grid. Do I really need to call another event handler to remove this space on the cancel or update events?
Here is the method I am using. It would help if I could find a way to streamline this, too, so that it only ran on the last row.
function allowValidationShow() { var grid = $('#grid').data("kendoGrid"); grid.table.on('focusout', '.k-invalid', adjustGridHeight);}function adjustGridHeight() { var content = $('#grid').find('.k-grid-content'); var height = content.height(); var cell = $(this).closest('td'); var message = cell.find('.k-invalid-msg'); var callout = message.find('.k-callout'); var position = message.position(); var top = position.top + callout.outerHeight() + message.outerHeight(); if (top > height) { content.height(top); }}This would be a lot easier to use if there were only a way to ensure that the validation tooltip could be ABOVE the pagination. Then, no additional code would be needed.
Thanks for your help!

I'll explain better...
I have a grid and when I add the
filterable: { mode: "row"},
it adds the hidden columns and throws the whole layout of the grid off.. Please see attachment ss1.png, as well if you hover over the filter field you can notice a shift in size.. However the issue is why the filterable attribute messes up the grid?
here is my grid
function ShowGroupGrid(userdata) { $("#GroupGrid").kendoGrid({ noRecords: { template: "No Records Available" }, dataSource: { data: userdata }, schema: { model: { fields: { GroupID: { type: "number" }, LocationID: { type: "number" }, Group: { type: "string" }, Location: { type: "string" }, LocationNumber: { type: "string" }, Contact: { type: "string" }, Email: { type: "string" } }, } }, filterable: { mode: "row" }, columns: [ { title: "<input id='checkAll', type='checkbox', class='check-box' />", template: "<input name='Selected' class='checkbox' type='checkbox'>", width: "30px" }, { hidden: true, title: "GroupID", field: "GroupID"}, { title: "LocationID", field: "LocationID", hidden: true, filterable: { cell: { showOperators: false } } }, { field: "Group", title: "Group", filterable: { cell: { showOperators: true, operator: "contains" } } }, { field: "Location", title: "Location", filterable: false }, { field: "LocationNumber", title: "Location Number", filterable: false }, { field: "Contact", title: "Contact", filterable: false }, { field: "Email", title: "Email", filterable: false } ], scrollable: true, height: 856 });}
Am I missing something? If I add this code to the Kendo Dojo then everything works fine.
I am using bootstrap with this as well and not sure if I have the correct CSS and JavaScript references in the right order or not.
What is the correct referencing order and files to be referenced when using Bootstrap and KendoUI in html?
Right now I have a view that I guess you can call a masterpage, and I have referenced Bootstrap and KendoUI but I noticed when creating a grid, and adding filtering capability to it that I am getting two extra columns, as seen in attachment ss1.PNG .
However, when I add the code into KendoUI's dojo it looks normal, as seen in attachment ss2.PNG
So I am thinking that maybe I have my referencing in incorrectly
here is my "masterpage"
@{Layout = null;}<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width" /><title>Test</title><script src="~/Scripts/jquery-2.1.0.min.js"></script><script src="~/Scripts/Kendo.2016.1.226/kendo.all.min.js"></script><script src="~/Scripts/bootstrap.min.js"></script>@Styles.Render("~/Content/css")<link href="@Url.Content("~/Content/bootstrap.css")" rel="stylesheet" type="text/css" /><link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" type="text/css" /><link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /><link href="@Url.Content("~/Content/bootstrapValidator.min.css")" rel="stylesheet" type="text/css" /><!--Kendo style--><link href="~/Content/Kendo.2016.1.226/kendo.default.min.css" rel="stylesheet" /><link href="@Url.Content("~/Content/Kendo.2016.1.226/kendo.common.min.css")" rel="stylesheet" type="text/css" /><link href="@Url.Content("~/Content/Kendo.2016.1.226/kendo.common-bootstrap.min.css")" rel="stylesheet" type="text/css" /><link href="@Url.Content("~/Content/Custom/Layout.css")" rel="stylesheet" type="text/css" /><link href="~/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet" /><link href="~/Content/Custom/MyTest.css" rel="stylesheet" /><link href="~/font-awesome-4.6.3/css/font-awesome.min.css" rel="stylesheet" /><link href="~/Content/Custom/GlobalStyle.css" rel="stylesheet" /></head><body><div class="container"><div class="row"><header><center><img src="~/Images/test-logo-sm.png" /></center></header></div><nav class="v-wrapper"><ul><li class="v-brand"><center><lh><label style="font-weight:bold; color:white;">Menu</label></lh></center></li> <li><span class="glyphicon glyphicon-dashboard" style="color:green;"></span><a href="#" id="dashboard"> Dashboard</a></li><li><span class="fa fa-users" style="color:#003366;"> </span><a href="#" id="manageusers">Manage Login Users</a></li><li><span class="fa fa-group" style="color:orange;"> </span><a href="#" id="managegroups">Manage Groups</a></li><li><span class="fa fa-gears" style="color:red;"> </span><a href="#">Manage VS Equipment</a></li></ul></nav></div><!-- End Upper Container --> <div class="container body-content"><div class="row"><div class="col-md-12 col-lg-12"><h1>Blah</h1><p> This is where your main stuff goes</p></div></div><!-- End Row --></div><!-- End Main Container --><!-- Scripts -->@*<footer class="footer"><p align="center">Footer Content Goes here</p></footer>*@<script>$(document).ready(function () {$('#manageusers').click(function () {$('.body-content').load("../ManageLoginUsers/ManageUsers");});$('#managegroups').click(function () {$('.body-content').load("../ManageGroups/ManageGroups");});});</script> </body></html>
I can't get Bootstrap and KendoUI to play well together and I think it may have to do with my order of referencing all the CSS and Scripts.
So what is the correct order?
Hello!
I've been researching how to better incorporate Kendo into our Gulp/NPM workflow. Here's what I'm trying to do:
1) Include Kendo in my project's package.json file
2) npm install to get the latest
3) Run a gulp task to get my custom version of Kendo JS
4) Use this file in my project
I started here to get the kendo professional NPM package. I was able to get them with this npm command:
npm install --save-dev git+https://username:password@bower.telerik.com/npm-kendo-ui.git
I got the npm package just fine, but noticed there is no gulpfile.js that I could run the task gulp custom -c widgetA, widgetB, based on this documentation. I did some more digging and found that downloading the source code from the Downloads page includes the gulpfile, which I was able to gulp custom from.
I was also seeing some threads hinting around the idea, here. Foundation makes it very easy to build my own js package with their NPM package/files. I was hoping I could easily build my own files too.
Any ideas how I can build a custom version of Kendo Professional JS with the NPM package? Either through Kendo's gulp task or my own gulp task. Thanks!
Fillip

We have Kendo Editable Grids with editables as opups. On these popups we have a number of Drop Downs. Based on the values that a user selects , we want to make certain fields apper\disappear , change value etc.
But we are getting a java script error
Refer the Example here
var ProductModel = kendo.data.Model.define({
id: "ProductID",
fields: {
ProductID: { type: "string" },
ProductName: { type: "string" },
ContactName: { type: "string" },
UnitPrice: { type: "number" },
UnitsInStock: { type: "number" },
Discontinued: { type: "bool" }
}
});
var productDatasource = new kendo.data.DataSource({
data: [{"ProductID":1,"ProductName":"Chai","UnitPrice":18,"UnitsInStock":39,"Discontinued":false},{"ProductID":2,"ProductName":"Chang","UnitPrice":19,"UnitsInStock":17,"Discontinued":false},{"ProductID":3,"ProductName":"Aniseed Syrup","UnitPrice":10,"UnitsInStock":13,"Discontinued":false},{"ProductID":4,"ProductName":"Chef Anton\u0027s Cajun Seasoning","UnitPrice":22,"UnitsInStock":53,"Discontinued":false}],
schema: {
model: ProductModel
}
});
var actionDataSource = new kendo.data.DataSource({
data: [
{"Value": 1, "Text": "Edit"},
{"Value": 2, "Text": "Delete"},
{"Value": 3, "Text": "Preview"},
{"Value": 4, "Text": "Clone"}
]
});
var onClick = function (event, delegate) {
event.preventDefault();
var grid = $("#grid").data("kendoGrid");
var selectedRow = grid.select();
var dataItem = grid.dataItem(selectedRow);
if (selectedRow.length > 0)
delegate(dataItem);
else
alert("Please select a row.");
};
$(function() {
var viewModel = new kendo.data.ObservableObject({
dataSource: productDatasource,
actionSource: actionDataSource,
onChange: function (event) {
onClick(event, function (dataItem) {
alert(dataItem.ProductID + " " + dataItem.ProductName);
});
},
});
kendo.bind($("#grid"), viewModel);
});
<script type="text/x-kendo-template" id="ddlGrid">
<input data-role="dropdownlist"
data-text-field="Text"
data-value-field="Value"
data-bind="source: actionSource, events: { change: onChange}"/>
</script>
<div class="demo-section">
<div class="k-content" style="width: 100%">
<div id="grid"
data-role="grid"
data-toolbar="[{'name': 'create', 'text': 'Add'}]"
data-role="grid"
data-scrollable="true"
data-editable="popup"
data-selectable="true"
data-filterable="true"
data-sortable="true"
data-pageable="true"
data-columns="[
{ field: 'ProductID' },
{ field: 'ProductName' },
{ field: 'UnitPrice' },
{ field: 'UnitsInStock' },
{ field: 'Discontinued' },
{ title: 'Action', template: kendo.template($('#ddlGrid').html())} ]"
data-bind="source: dataSource, event">
</div>
</div>
</div>
Hi All,
I'm new in kendo UI and i want to know that how can i pass a date picker or any other selector value from one page to another page and according to that value how can I fetch data from database(using PHP or ASP.NET C#) to display it in grids or graphs.I have attached an Mockup of my requirement.
Kindly Give some solution for this.
Thanks,
Amit Sah
I have configured a scheduler control, see below, to read tasks from a rest service. However, nothing is displayed within the scheduler. If I take the raw JSON from the rest services response and put it directly into the configuration it will display within the scheduler. Below is the configuration:
$('#scheduler').kendoScheduler({
date: new Date('2016/10/31'),
startTime: new Date('2016/10/31 12:00 am'),
dataSource: {
batch: true,
transport: {
read: {
url: 'http://localhost:52089/api/v1/calendar/events',
dataType: 'json'
}
},
//data: [{"id":1,"dossierCustomerId":"1234ABCD","start":"2016-10-31T12:00:00Z","timeZone":null,"end":"2016-10-31T16:00:00Z","title":"Test Event","description":"This is a test event created by Frank.","ownerId":1,"isAllDay":false,"recurrenceRule":null,"recurrenceException":null,"eventResources":[]}],
schema: {
model: {
id: 'id',
fields: {
//taskID: { from: 'id', type: 'number' },
title: { from: 'title', defaultValue: 'No title', validation: { required: true } },
start: { type: 'date', from: 'start' },
end: { type: 'date', from: 'end' },
description: { from: 'description' },
ownerId: { from: 'ownerId', defaultValue: 1 },
isAllDay: { type: 'boolean', from: 'isAllDay' }
}
}
}
}
});
The JSON returned from the service:
[{"id":1,"dossierCustomerId":"1234ABCD","start":"2016-10-31T12:00:00Z","timeZone":null,"end":"2016-10-31T16:00:00Z","title":"Test Event","description":"This is a test event created by Frank.","ownerId":1,"isAllDay":false,"recurrenceRule":null,"recurrenceException":null}]
Any help would be appreciated.
I have a kendo ui grid with toolbar create.
In that, I want to disable 2nd column(here "operand" column) when 1st row is inserted.
From 2nd row onwards, I want that column to be enabled.
Can someone please help me achieve this?
I am struggling to have this much of control in kendo grid.
Here is the code below:
var rateScheduleItemGridDatasource = new kendo.data.DataSource({ transport: { read: { type: 'get', url: config.apiServer + "api/RateSchedule/GetAllRateScheduleItems?rateScheduleId=" + selectedRateScheduleId, dataType: "json" }, destroy: { type: 'delete', url: function (options) { alert('hi'); $.ajax({ url: config.apiServer + "api/RateSchedule/DeleteRateScheduleItem?rateScheduleItemId=" + options.RateScheduleItemId, type: 'delete', data: ko.toJSON(options), contentType: "application/json", success: function (data) { popupNotification.show(updateSuccessMessage, "success"); rateScheduleItemGridDatasource.read(); }, error: function (jqXHR, textStatus, errorThrown) { popupNotification.show(updateFailureMessage, "error"); } }); }, dataType: "json", contentType: "application/json" } }, serverPaging: false, serverSorting: false, serverFiltering: false, serverGrouping: false, serverAggregates: false, batch: true, schema: { data: "Data", total: "Total", errors: "Errors", model: { id: "RateScheduleItemId", fields: { RateScheduleItemId: { type: "number", editable: false, nullable: false }, RateScheduleId: { type: "number", editable: false, nullable: false, validation: { required: true } }, MathmetricalSymbolCode: { type: "number", nullable: true, editable: true, validation: { required: false } }, MathmetricalSymbolCodeValue: { type: "string", nullable: true, editable: true, validation: { required: false } }, MeasureTypeCode: { type: "number", nullable: true, editable: true, validation: { required: false } }, MeasureTypeCodeValue: { type: "string", nullable: true, editable: true, validation: { required: false } }, MultiplierRate: { type: "number", nullable: true, editable: true, validation: { required: false } }, RangeLowerNumber: { type: "number", nullable: true, editable: true, validation: { required: false } }, RangeUpperNumber: { type: "number", nullable: true, editable: true, validation: { required: false } }, RateTier: { type: "string", nullable: true, editable: false, validation: { required: false } } } } }}); $("#rateScheduleItemGrid").kendoGrid({ columns: [ { "command": [{ name: "destroy", text: " " }], "width": "60px" }, { "title": "Rate Tier", "width": "100px", "field": "RateTier" }, { "title": "Operand", "width": "100px", "field": "MathmetricalSymbolCodeValue", "editor": rateScheduleItemOperandDropDownEditor, values: rateScheduleItemOperandReferenceData }, { "title": "Range (From)", "width": "100px", "field": "RangeLowerNumber" }, { "title": "Range (to)", "width": "100px", "field": "RangeUpperNumber" }, { "title": "Rate (Multiplier)", "width": "100px", "field": "MultiplierRate" } ], resizable: true, editable: true, editable: { createAt: "bottom" }, groupable: false, filterable: false, pageable: false, sortable: false, scrollable: true, height: 200, dataSource: rateScheduleItemGridDatasource, cancel: function (e) { dirty = false; }, save: function (e) { dirty = false; }});Have a json array that has arrays of arrays. However, the key value pair of an array is displaying "[object Object]" when I add the template "=#manufacturer.name" I get undefined. Can the grid handle this type of json object. See attached file for object layout. I am using Kendo UI Grid with AngularJS 1.15