I have a kendogrid and when I add a new record and rebind the grid, the new record is not in the grid, however if I use the filter for it then I see it, but to actually see it in the grid I have to refresh my page.
When the page loads it calls this function
function GetCustomerGridData() { kendo.ui.progress($("#Customer-Grid"), true); $.ajax({ type: "GET", url: URLParam.GetActiveCustomersForTheGrid, dataType: "json", contentType: "application/json; charset=utf-8", success: function (data, textStatus, jqXHR) { LoadCustomerGrid(data); kendo.ui.progress($("#Customer-Grid"), false); } });}
The LoadCustomerGrid is this
function LoadCustomerGrid(newData) { CreateCustomerGrid(newData);}
The grid itself is..
var customerGrid, CreateCustomerGrid = function (newData) { customerGrid = $("#Customer-Grid").kendoGrid({ dataSource: { data: newData }, schema: { model: { CustomerID: { type: "number" } } }, filterable: { mode: "row" }, columns: [ { template: "<input type='checkbox' class='checkbox' />", width: "30px" } { field: "LastName", title: "Last Name", filterable: { cell: { showOperators: false, operator: "contains", inputHeight: "34px" } } }, { field: "FirstName", title: "Name", filterable: { cell: { showOperators: false, operator: "contains" } } }, { field: "Phone", title: "Phone", filterable: { cell: { showOperators: false, operator: "contains" } } }, { field: "Address", title: "Address", filterable: { cell: { showOperators: false, operator: "contains" } } }, { field: "City", title: "City", filterable: { cell: { showOperators: false, operator: "contains" } } }, { field: "Zip", title: "Zip", filterable: { cell: { showOperators: false, operator: "contains" } } } ], scrollable: true, sortable: true, pageable: { pageSize: 20 }, selectable: "row", height: $("#Customer-Grid").closest(".col-height-full").height() - 60, change: function (e) { // Function call goes here var detailRow = this.dataItem(this.select()); var optionID = detailRow.get("CustomerID") } }).data("kendoGrid"); }
When I go to add a record I use a popup
function CustomerPopupEditor() { $("#showCustomerEdit").append("<div id='window'></div>"); var myWindow = $("#window").kendoWindow({ position: { top: 100, left: "30%" }, width: "40%", title: "Add Customer", content: "/Customer/CustomerEditor", modal: true, actions: [ "Close" ], close: function (e) { $("#window").data("kendoWindow").destroy(); } }).data("kendoWindow"); myWindow.open(); GetStates(); HomeStorage.Keys.AddOrEdit = "Add";}
and when add a new record and click the save button, this function is called
function SubmitNewCustomer() { var customer = NewCustomerToSubmit(); GetAssignmentIDs(); $.ajax({ type: "POST", url: URLParam.AddNewCustomer + "?assignments=" + HomeStorage.Keys.AssignmentIDString, dataType: "json", contentType: "application/json; charset=utf-8", data: JSON.stringify(customer), success: function (data, textStatus, jqXHR) { HomeStorage.Keys.NewCustomerID = data.id; }, complete: function (e) { GetCustomerGridData(); ClearFields(); } })}
and when I close the popup on a button click event this is called
$("#btnCancel").click(function () { ClearFields(); GetCustomerGridData(); CloseTheWindow();});
In the SubmitNewCustomer function I have tried putting the GetCustomerGridData() in its success function and that didnt work either.
The data being returned for the GetCustomerGridData() has over 30K records, but I dont think that should matter much.
Any idea what I am missing?

Lets say, I have a model like the following:
public class AssignmentListViewModel
{
public string JsonAssignmentList { get; set; }
}
Loading the model:
model.JsonAssignmentList = Newtonsoft.Json.JsonConvert.SerializeObject(assignmentList.Assignments);
On the client when I create new kendo.data.TreeListDataSource, I try to do the following and get error
"SCRIPT1028: Expected identifier, string or number"
var json = JSON.parse(@Model.JsonAssignmentList);
var dataSource = new kendo.data.TreeListDataSource({
@*data: JSON.stringify(@Model.JsonAssignmentList),*@
data: json,
// Enable batch updates
batch: true,
// Define the model schema
schema: {
model: {
id: "Id",
fields: {
Id: { type: "number", editable: false, nullable: false },
parentId: { from: "ChildAssignmentListId", type: "number", defaultValue: 0 },
Step: { validation: { required: true } },
AssigneeDisplayName: { validation: { required: true } },
Description: { validation: { required: true } },
Status: { validation: { required: true } },
StatusText: { validation: { required: true } },
Instructions: { validation: { required: false } },
//Deadline: { validation: { required: false } },
DeadlineDueDateText: { validation: { required: false } }
}
}
}
});
How can I return json string from the controller and bind it to a kendo treelist?
I have 3 pie charts
They all sit below each other but they are all different widths as the legend is on the left and the lengths of the legend lable varies.
How can I specify a fixed with for the legend or pie chart so that they are consistant size

I am trying to initialize kendo-grid however I am getting strange error which is not traceable.
I have splitter in the page which was working. When I add the grid, I get following error in console.
angular.js:12450 TypeError: Cannot read property 'removeAttribute' of undefined
at link (http://localhost:8080/dv/SiteOptimizer/libs/telerik.kendoui.professional.2015.3.1111.commercial/js/kendo.custom.min.js:9:50947)
at $ (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:73:89)
at K (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:62:39)
at h (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:54:410)
at h (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:54:433)
at h (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:54:433)
at h (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:54:433)
at h (http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:54:433)
at http://localhost:8080/dv/SiteOptimizer/libs/angular-1.4.6/angular.min.js:53:480
at http://localhost:8080/dv/SiteOptimizer/libs/angular-ui-router.min.js:7:23478
Strangely when I remove splitter and add only the grid, it works fine.
Can you help me with what is happening here?
Hello,
I'm using kendo ui in an angular (1.5.8) SPA and noticed a memory switching between 2 views.
View A: with kendo ui toolbar (without options, so no toolbar items).
View B: without kendo ui toolbar.
Switching from View A to View B and back to View A adds exactly 80 objects in memory (aprox. 4.2 kB).
Since i use the toolbar in a lot of views and nested views the memory usage over time goes up dramatically.
Calling the toolbar.destroy() on the destroy event of the angular component controller doesn't make any difference.
It looks like it has something to do with the overflow button which apparently gets a new data-uid every time and stays in the jquery tokencache.
Is this a known issue and/or how can this be fixed ?
Thanks in advance
Hello,
I'd like to update the title field of my event dynamically. I can do this by using jquery to select the title input and updating its value. Example,
$('[name="title"]').val("New Test Title")
This updated value is based on another dropdown and therefor is evaluated dynamically so cannot be set in the configuration.
However, when I save the event the title does not save with the updated value. Is there a way I can force the underlying event object to bind to the value dynamically added to the title input.
Thanks
field: "ItemNo", title: "Item #", width: 120,template: "<a href='\\#' class='link' onclick='displayItemDetails(\"#=ItemNo#\")'>#=ItemNo#</a>",I have a grid with a checkbox template. When I check a checkbox, and click Edit, I get a popup window, which is expected, when I close the popup window, I destroy the grid and rebind the grid again.
When I go to select another record to edit and check that checkbox, then all of a sudden the checkbox of the very first row gets checked as well, and it doesnt matter which checkbox I check, because it also checks the first rows checkbox
The code I am using is
var vendorGrid, CreateVendorGrid = function (newData) { $("#Vendor-Grid").kendoGrid({ dataSource: { data: newData }, schema: { model: { fields: { VendorID: { type: "number" } }, } }, filterable: { mode: "row" }, columns: [ { template: "<input name='Selected' class='checkbox' type='checkbox'>", width: "30px" }, { field: "VendorName", title: "Vendor", filterable: { cell: { showOperators: false, operator: "contains" } } }, { field: "Email", title: "Email", filterable: { cell: { showOperators: false, operator: "contains" } } }, { field: "Phone", title: "Phone", filterable: false }, { field: "City", title: "City", filterable: false }], scrollable: true, sortable: true, pageable: { pageSize: 20 }, selectable: "row", height: $("#Vendor-Grid").closest(".col-height-full").height()-60, change: function (e) { } }).data("kendoGrid");}//This to get the data to populate the gridfunction GetVendorGridData() { kendo.ui.progress($("#Vendor-Grid"), true); $.ajax({ type: "GET", url: URLParam.GetVendorsForGrid, dataType: "json", contentType: "application/json; charset=utf-8", success: function (data, textStatus, jqXHR) { CreateVendorGrid(data); kendo.ui.progress($("#Vendor-Grid"), false); } });}//This is part of my script in my popup window for closing the window $("#btnCloseVendorEditor").click(function () { RefreshVendorGrid(); GetVendorGridData(); CloseTheWindow();});function RefreshVendorGrid() { var theGrid = $('#Vendor-Grid').data('kendoGrid'); theGrid.destroy();}