1. Set up kendo grid:
@(Html.Kendo().Grid(Model)
.Name("gridnamehere")
.Columns(columns =>
{
columns.Bound(p => p.Name);
columns.Command(commands =>
{
commands.Edit().Text("");
commands.Destroy().Text("");
}).Width(125);
})
.ToolBar(toolbar =>
{
toolbar.Create();
})
.Editable(editable => editable.Mode(GridEditMode.PopUp).Window(w => w.Title("Add/Edit")))
.Pageable()
.Events(e =>
{
e.Edit("onGridEditing");
e.DataBound("onGridDataBound");
e.Cancel("onGridCancel");
})
.Sortable()
etc...
2. javascript to replace existing buttons and display new icons (passing in the gridname because we will have several grids on the page):
function onGridDataBound(e) {
setKendoGridButtons(e.sender.wrapper[0].id);
}
function onGridCancel(e) {
setKendoGridButtons(e.sender.wrapper[0].id);
}
function onGridEditing(e) {
setKendoGridButtons(e.sender.wrapper[0].id);
}
function setKendoGridButtons(gridName) {
setTimeout(function () {
$("#" + gridName + " .k-grid-edit").html("<span class='fa fa-pencil fa-fw'></span>").css("min-width", "10px").removeClass("k-button");
$("#" + gridName + " .k-grid-delete").html("<span class='fa fa-times fa-fw'></span>").css("min-width", "10px").removeClass("k-button");
$("#" + gridName + " .k-grid-add").html("<span class='fa fa-plus fa-fw'></span>").css("min-width", "10px").removeClass("k-button");
});
}
This initially display as expected with the kendo buttons being replaced by the font awesome icons, however when we click on the Add or Edit buttons (icons), we get a screen flicker in the background where the old kendo buttons appear behind the add/edit template pop-up. This seems to happen when we change any details in the edit template popup i.e. on row change within the kendo grid?
Kendo multi select with checkbox not working properly with latest kendo version
https://jsfiddle.net/MNqaT/149/
Hello,
We recently updated to kendo 2015.1.429 and found out the following problem - in some of our bar charts the drawn chart width is much more bigger than the defined one. In the attached image you can see we defined the chartArea width of 600. In the right side of the image you can see that Chrome drew an much much wider svg.
Notice that not all of our charts were impacted like this, but we fail to see the difference between those charts that still work well and those that no longer work as expected following this update.
We did manage to restore this problem and you can experience it using the following link:
http://dojo.telerik.com/aQumu
Please advise.
Thanks,
Ron.
I would like make a char look like image.
Is it possible?
I'm trying to use a single datetime field from my JSON to fill the date and time in separate areas of my template, and it's not working.
Here's an example of the JSON:
{"Course": { "Name":"Test Course", "ChapterData":[{ "Name":"Module 1", "TaskData":[{ "Name":"Module 1 Task 1", "CompletedDate":"05\/12\/2015 19:25:43" }] }]}}And here's where I'm trying to format and display the information:
<i class="fa-icon-check mar-rt-sm"></i>#= kendo.toString(data.ChapterData[c].TaskData[t].CompletedDate, 'dd-MMM-yyyy') #<span class="hidden-xs">#= kendo.toString(data.ChapterData[c].TaskData[t].CompletedDate, 'h:mm tt') #</span>Instead of seeing "12-May-2015" for the date and "7:25 PM" for the time, I'm seeing the full datetime string, completely unformatted, in both areas (ie. 05/12/2015 19:25:43). I tried modifying the JSON to pass back separate date and time fields and that didn't work either.
var originalDataset = [ { "id" : "uuid1", "editableParentField" : "someParentValue", "nonEditableParentField" : "someParentValue", "children" : [ { "editableChildField" : "someChildValue", "nonEditableChildField" : "someChildValue" }, { "editableChildField" : "someChildValue", "nonEditableChildField" : "someChildValue" } ] }, { "id" : "uuid2", "editableParentField" : "someParentValue", "nonEditableParentField" : "someParentValue", "children" : [ { "editableChildField" : "someChildValue", "nonEditableChildField" : "someChildValue" } ] }]var ParentObject = kendo.data.Model.define({ id: "id", fields: { "editableParentField" : { type: "string", editable: true}, "nonEditableParentField" : { type: "string", editable: false} } }); var ChildObject= kendo.data.Model.define({ fields: { "editableChildField" : { type: "string", editable: true}, "nonEditableChildField" : { type: "string", editable: false} } });$scope.observableArray = new kendo.data.ObservableArray([]);angular.forEach(originalDataset, function(value, key){ var parentObject = new ParentObject(value); var children = []; angular.forEach(originalDataset.children, function(value, key){ var childObject = new ChildObject(value); children.push(childObject); } parentObject.set("children", children); // ParentObject now has an array of ChildObjects. $scope.observableArray.push(parentObject);});Hello,
I have an ASP.NET WebForms application rendering a DataGrid. I need to extend it with a Quick-Edit function and I decided to use a kendo.UI window for this task. I've been using them before in the application without any problems. But on this particular page I can't get it centered correctly. I have no CSS assigned to the div (window). I've tried changeing the location of the div in the markup without any effect.
What happens: I click on the button to open the window and the window scrolls the page down a lot and then pops up the window at the bottom of the visible area. If you are at the bottom of the page, the page also gets scrolled down (into an area not visible/there normally).
This is the declaration of the window:
$(function () { dialog_QuickEditUsedBike = $("#dialog_QuickEditUsedBike").kendoWindow({ title: "", actions: [ "Close" ], modal: true, draggable: true, resizable: false, visible: false });});And this is how it is opened:
dialog_QuickEditUsedBike.data('kendoWindow').center();dialog_QuickEditUsedBike.data('kendoWindow').open();The other markup is rather complicated. I'd rather send you login data to the page, so you can take a look at it live, if that is fine with you.
Kind regards,
Krisztian