Trying to paste in some cells copied from Excel and get "TypeError: this.dialog(...) is undefined" error.
See ERROR HERE below.
var SpreadsheetDialog = kendo.spreadsheet.SpreadsheetDialog = kendo.Observable.extend({
init: function(options) {
kendo.Observable.fn.init.call(this, options);
this.options = $.extend(true, {}, this.options, options);
},
dialog: function() {
if (!this._dialog) {
this._dialog = $("<div class='k-spreadsheet-window k-action-window' />")
.addClass(this.options.className || "")
.append(this.options.template)
.appendTo(document.body)
.kendoWindow({
scrollable: false,
resizable: false,
maximizable: false,
modal: true,
visible: false,
width: this.options.width || 320,
title: this.options.title,
open: function() {
this.center();
},
deactivate: function() {
this._dialog.destroy();
this._dialog = null;
}.bind(this)
})
.data("kendoWindow");
}
return this._dialog;
},
destroy: function() {
if (this._dialog) {
this._dialog.destroy();
this._dialog = null;
}
},
open: function() {
>>>> ERROR HERE >>>> this.dialog().open();
},
apply: function() {
this.close();
},
close: function() {
this.dialog().close();
}
});
It seems that the default behavior of the control is to set autocomplete="off" which is fine except Chrome does not like to adhere to this standard.
Developers should be allowed to override the this default behavior if need be to set the autocomplete type of the textbox, however, setting this via the htmlattributes does not do anything.
Example using the MVC Wrappers:
html.Kendo().MaskedTextBoxFor(e).Mask(mask).HtmlAttributes(new { @class = "form-control", autocomplete = "tel-national" })
I'd like to create a grid that has certain filters already populated. For example:
http://codepen.io/vrmerlin/pen/bVadML
I would like to have the word "ACTIVE" in the State column's filter value. The user can then edit if desired (or add other filters). I can't figure out how to do that. any suggestions?
Thanks,
John
So based on this: http://demos.telerik.com/kendo-ui/upload/angular , I should be able to combine these, but cannot. Am using angular (not v2) and have basically went through this verbatim with no luck. I mean, I drag or select, and it does not show any files. My code in my view is:
<div class="de
<form> <div class="demo-section k-content" ng-controller="claimsController"> <div> <h4>Upload files</h4> <input name="files" type="file" kendo-upload k-async="{ saveUrl: 'save', removeUrl: 'remove', autoUpload: true }" k-select="onSelect" /> </div> <div style="padding-top: 1em;"> <h4>Console</h4> <div class="console"></div> </div> </div></form>Hello Everyone,
I am trying to refresh the kendo grid in javascript, when a user click on refresh button. It is working fine in Mozilla browser but in IE11 it is not working properly.
In IE11 refreshing the grid is working one time after that couldn't be able to reload the grid (calling the action method). Please find the following code..
Controller:
public ActionResult SelectApprovalFlow([DataSourceRequest]DataSourceRequest request)
{
Request objRequest = ((Request)Session["Request"]);
return Json(GetApproverDetails(objRequest).ToDataSourceResult(request), JsonRequestBehavior.AllowGet);
}
Grid:
@(Html.Kendo().Grid<MyProject.Model.GetApprovals>()
.Name("grdApprovalFlow")
.Columns(columns =>
{
columns.Bound(p => p.ApprovalID).Hidden(true);
columns.Bound(p => p.Approver).Width(120).Title("Approver").HeaderHtmlAttributes(new { style = "text-align:center;font-weight: bold" });
columns.Bound(p => p.StepDescription).Width(100).Title("Step").HeaderHtmlAttributes(new { style = "text-align:center;font-weight: bold" });
})
.AutoBind(false)
.DataSource(
dataSource => dataSource
.Ajax()
.Events(events => events.Sync("sync_handler"))
.Read(read => read.Action("SelectApprovalFlow", "Approval"))
)
)
Button:
<button id="btnApprovalFlow" onclick="return btnClick();">
My Button
</button>
Javascript:
function btnClick() {
$("#grdApprovalFlow").data('kendoGrid').dataSource.read();
return false;
}
Thank you so much for your help..
I use razor Html Helper to create a Kendo UI Grid. The grid is created so the edition of a record is done via a popup window form. Here is the code
@(Html.Kendo().Grid<MyObject>() .Name("grid") .Editable(edit => edit .Enabled(true) .Mode(GridEditMode.PopUp) ) .Columns(columns => { // Column declaration }) .ToolBar(toolbar => { toolbar.Create()); }) .DataSource(dataSource => dataSource .Ajax() .Model(model => model.Id(m => m.Id)) .ServerOperation(false) .Events(e => { e.Error("error_handler"); e.Sync("sync_handler"); }) .Read("Read", "MyController") .Create(c => c.Action("Create", "MyController")) .Update(u => u.Action("Edit", "MyController")) ) )
I set a handler on both error and sync event of my datasource. The sync handler force a read from the server since some data must be refreshed on create and update operation. The error handler is supposed to prevent the refresh of the grid if an error occur on create or update. Here are both of my handlers
function error_handler(e) { if (e.errors) { $('#grid').data("kendoGrid").one("dataBinding", function (ss) { ss.preventDefault(); // cancel grid rebind if error occurs }); } } function sync_handler(e) { e.sender.read(); }I'm trying to achieve something that I thought was rather simple...
Note: We could probably achieve this using the router's handler, but I'm hoping to avoid that approach.
If I put a click handler on the menuButton or after the row "type: 'splitButton' it can never find the handler. The same goes for the entire toolbar click handler as can be seen in the examples below.
I also thought of creating a second template that will be called by the first template in which I would create a button and again try binding a click handler.
Problems
When I try to bind directly to any of the click handlers I get a JS handler error coming from Kendo like it can't find the defined handler. "TypeError: handler is not a function - kendo.all.js (line 10790, col 20)"
When I try the templates approach I keep getting a Invalid Template exception.
<script id="gridRowActionItem" type="text/x-kendo-template"> <a href="#" data-bind="events: { click: rowItemInToolbarClicked }">Click Me</a></script><script id="gridRowActions" type="text/x-kendo-template"> <div id="toolbar" data-role="toolbar" data-items='[ { type: "splitButton", text: "Continue", menuButtons: [ { text: "Continue Quote", url: "\\#/quote/step1/#:data.quoteId#" }, { text: "Download PDF" } ] }, { template: kendo.template($("#gridRowActionItem").html()) } ]' data-bind="events:{click: OnActionsClick}"> </div></script> <div id="quotes" data-role="grid" data-bind="source: quotes" data-editable="true" data-columns="[ { 'field': 'description' }, { 'field': 'status'}, { 'field': 'broker', 'title': 'Broker}, { 'field': 'date', 'title': 'Date}, { template: kendo.template($('#gridRowActions').html()) }]"></div>I have a named list of periods (name, begin, end) that I would like to display in a gantt like fashion for better overview.
I dont need resources, assignments, tasks etc.
I wonder which widget would be best suited: the gantt, scheduler (timeline) or a scrollable bar chart with a date axis?
Hi,
i am new to kendo ui and wrote my first kendo html app. Its working fine but know i have to translate them in different languages liek french, german or dutch.
I spend know several days here in the forum and on google to find a continuous line for that, but i didn' catch it so far. What i read here from post of 2012/203 that this is on the todo list, but i think in 2015 this should be completed .What i already have learnd that it is possible to display widgets in an other language
But what abou the rest ? I saw an example (could'nt find it any longer) where other parts of the html side were translatedt via a observerable and bind construct, but this could'nt be the best practise for that.
As concrete example my question is how to translate the terms "Print","Filter" and 'Suche' in this construct of a kendoToolBar:
$("#toolbar").kendoToolBar({
items: [
{ type: "button", text: "Print" , id: "btnPrintPdf" },
{ type: "button", text: speech.anzeige , id: "btnShowPdf"},
{ type: "separator" },
{ template: "<label >Filter : </label>" },
{
template: "<input class=k-textbox type=text id='txtSearchString' placeholder='Suche'>",
overflow: "never"
},
{ type: "button", text: "Search", id: "btnSearch" },
{ type: "separator" }
]
});
So , waht is the best way to do that ?
- use the bind construct
- use templates
- use an external jquery plugin ?
A small demo app where the language can be switched at runtime would be nice to see the best practise.
Regards
Dirk