or
01.function kendoGridErrorHandler(args) {02. if (args.errors == undefined) {03. if (args.xhr.status == 403) {04. updatePrimaryMessage("You are not authorised to carry out that operation.", true);05. } else if (args.xhr.status == 401) {06. updatePrimaryMessage("You need to be logged in to carry out that operation.", true);07. } else if (args.xhr.status == 500) {08. updatePrimaryMessage("The operation did not complete because of an error.", true);09. } else {10. updatePrimaryMessage("There was problem. Please refresh the screen.", true);11. }12. $('#PrimaryKGrid').data().kendoGrid.one('dataBinding', function(e) {13. e.preventDefault();14. });15. } else {16. //error means Ajax error response. customerror means Kendo error response17. var grid = $('#PrimaryKGrid').data("kendoGrid");18. grid.one("dataBinding", function(e) {19. e.preventDefault(); // cancel grid rebind if error occurs 20. //We have formatted errors to display21. for (var error in args.errors) {22. showMessage(grid.editable.element, error, args.errors[error].errors);23. }24. });25. }26.}@(Html.Kendo().Grid<ToolListItemView>().Name("texListGrid") .Columns(columns => { columns.Bound(m => m.ToolId); columns.Bound(m => m.Description).HtmlAttributes(new { style = "font-size: 1.3em;" }); columns.Bound(m => m.LastModified); columns.Bound(m => m.ConditionName); columns.Bound(m => m.LocationName); }) .DataSource(dataSource => dataSource .Ajax() .Read(read => read.Action("ToolsRead", "List").Data("listParams")) ))
@(Html.Kendo().ComboBox() .Name("ID_Poblacion") .DataValueField("Item1") .DataTextField("Item2") .DataSource(dataSource => dataSource // Configure the grid data source .Read(read => read.Action("Items", "Poblacion", new { Area = "DataAPI" })) ) .Value(Model.ID_Poblacion.ToString()))grid.bind("edit", function (e) { window.location = '@Url.Action("AddEditCoalition","Form",new{coalitionId=Model.CoalitionId})' + '&formId=' + e.model.Id;});Hi,
Is it possible to find a node by id (clientside)?
Here is how we populate the treeview.
public JsonResult _AjaxLoading(string id) { IEnumerable nodes = from item in GetDirectorys() where (id == null ? item.parent == "" : item.parent == id) select new { id = item.directory, Name = item.name, hasChildren = item.aantal > 0, }; return Json(nodes, JsonRequestBehavior.AllowGet); }