problem about kendo-asp.net-mvc-Collection of common programming errors


  • Alex
    asp.net-mvc-4 kendo-ui kendo-asp.net-mvc
    I’m in the process of writing some unit tests for our controllers. We have the following simple controller.public class ClientController : Controller {[HttpPost]public ActionResult Create(Client client, [DataSourceRequest] DataSourceRequest request){if (ModelState.IsValid){clientRepo.InsertClient(client);}return Json(new[] {client}.ToDataSourceResult(request, ModelState));} }The unit test for this is as follows:[Test] public void Create() {// ArrangeclientController.ModelState.Clear();// ActJson

  • sarav
    javascript kendo-ui kendo-grid kendo-asp.net-mvc
    Is there a way to create different type of controls in a KendoUI grid column at runtime? The scenario is, I have 2 columns in my grid. The first column displays a dropdown list which has the some strings like, ‘Name’, ‘StartDate’, etc. When user selects a value from it, I want to show an appropriate control in the 2nd column. If the user picks ‘StartDate’, I want to show the ‘DateTime’ control. Can you please let me know how to do this thru ASP.Net MVC 5 wrapper?Sample Code:@(Html.Kendo().G

  • Tom Maxwell
    kendo-ui kendo-asp.net-mvc kendo-combobox
    I have a MVC4 .net app using Kendo UI. I get the set jsonrequestbehavior issue for comboboxes and dropdowns but not listview when they all use the same function to read. I want to populate a dropdown box. Am I missing something? Relevant Code:relevant part of the cshtml(view):<script type=”text/x-kendo-tmpl” id=”propertiestemplate”><div class=”partnersss”><h5>#:PartnerID#</h5><p>#:PartnerName#</p></div></script><div class=”editor-field”>@(Htm

  • RSolberg
    c# asp.net-mvc kendo-ui kendo-grid kendo-asp.net-mvc
    I am getting an exception while trying to use the KendoUI Grid for an ASP.NET MVC (.net 4.5) app being developed in Visual Studio 2013. I’ve configured the grid to use InLine editing and have explicitly set Batch to false in the data source section. This is being rendered as a partial view. It should be noted that if GridEditMode.InLine is set to GridEditMode.InCell no exception is thrown.ExceptionYou must use InCell edit mode for batch updates. Description: An unhandled exception occurred d

  • Zook
    c# javascript asp.net-mvc kendo-ui kendo-asp.net-mvc
    I’m pulling a bunch of entries from a database, storing them in a variable, and then filtering them down to a separate variable based on various criteria. Once my Kendo Chart is initialized, based on the filtered version, it somehow changes the date format of the entries in the first variable, but my code expects them to be in the original format. I’ve tracked the problem down to a single line, but I need that line.I’m using C# in ASP.NET MVC4.Here’s the ajax call that gets the data:$.ajax({// g

  • Jero Franzani
    jquery kendo-ui kendo-grid kendo-asp.net-mvc
    im working on an MVC Kendo Ui project and i’m having the following problem:I have an editable kendo grid with a custom edit button wich opens a partial view on a kendo window wich acts like an “editor template”. This seems to work fine first time but if i close the window and try to edit another item or even the same just does not work. I think that when i close the window this eliminate the elemment from the DOM but can’t figure it out how to fix it. Here is some code:@(Html.Kendo().Grid(Model)

  • akshay
    angularjs kendo-asp.net-mvc
    when i am running my code it is showing nothing and in the console of browser i am getting these two errors- 1. “Uncaught ReferenceError: _ is not defined ” and 2. “Uncaught Error: No module: kendo.directives ” i don’t know what wrong is going on in there.My code is -<script src=”~/Scripts/jquery-1.7.1.min.js”></script> <script src=”~/Scripts/angular/angularjs.js”></script> <script src=”~/Scripts/Kendo/kendo.all.min.js”></script> <script src=”~/Scripts/angu

  • ChampionChris
    jquery telerik kendo-ui kendo-asp.net-mvc
    Can somebody please give me the exact way the scripts should be placed on my layout page. no matter what way I do it I am getting different error or some controls work and others don’t or I am getting javascript errors.My layout page is like this:<head><meta charset=”utf-8″ /><meta name=”viewport” content=”width=device-width” /><link href=”~/favicon.ico” rel=”shortcut icon” type=”image/x-icon” /><title>Clients To Profits @ViewBag.Title</title>@Styles.Render(“

  • Egor
    javascript asp.net asp.net-web-api kendo-grid kendo-asp.net-mvc
    I use open source edition of kendo web, my current version is Kendo UI Web i’m using kendo ui and asp.net mvc 4 my kendo grid have this js code<script>$(document).ready(function () {$(“#grid”).kendoGrid({dataSource: {type: “odata”,serverSorting: true,serverFiltering: true,serverPaging: true,transport: {read: {url: “api/Usermanage”,dataType: “json”,contentType: “application/json”},create: {url: “/api/Usermanage”,dataType: “json”,type: “POST”},update: {url: function (UserModel) {return “/ap

  • teahou
    jquery kendo-ui kendo-grid kendo-asp.net-mvc
    I am trying to add some validation to a delete button my grid, so I am having the delete button execute a function when clicked, but it seems to be ignoring the function. Here is the function:function locDelete(e) {var len = this.dataSource.data().length;var item = $(“#trespassed-location-list”).data(“kendoGrid”).dataItem($(this).closest(“tr”));if (len === 1) {alert(“There must be at least one location.”);}else {alert(“This is in the else”);//this.remove(item);//this.removeRow($(e.target).close

  • Jark Monster
    javascript json kendo-ui kendo-grid kendo-asp.net-mvc
    I have a Kendo grid that I have an editable detail template. In the detail template, I have a multiselect.When I save, I am manually updating the dataItem to grab the most up to date options in the detail template’s multiselect. There is no problem with grabbing the data from the multiselect. Everything actually looks pretty good until I trigger the grid to save.I add the multiselect items to the grid’s dataItem with this code:function SaveRefItemSubCategories() { //Called on Save button clic

  • user797717
    javascript kendo-ui kendo-treeview kendo-asp.net-mvc
    I have problems with the KendoUI Treeview after upgrading to the latest version of KendoUI.Sample Code:<script type=”text/javascript”> var node1, node2; function onSelect(e) {node1 = e.node;addViews(); }function addViews() { if (node1 != null) {var treeview1 = $(“#TreeAvailable”).data(“kendoTreeView”);var treeview2 = $(“#TreeSelected”).data(“kendoTreeView”);treeview1.remove(node1); // *JavaScript Error as soon I remove the node* } }I’m getting a JavaScript Error “Unable to get propert

  • BahaiResearch.com
    kendo-ui kendo-grid kendo-asp.net-mvc
    Using MVC I have defined a column:@(Html.Kendo().Grid(Model.Items as IEnumerable<Holding>).Columns(columns =>…columns.Bound(e => e.MarketValue).Title(“Mkt. Value ($)”).ClientFooterTemplate(“<div class=aright>#= kendo.format(‘{0:N}’, sum) #</div>”)And set the Aggregates:.Sortable() .ColumnMenu() .Resizable(resize => resize.Columns(true)) .Reorderable(reorder => reorder.Columns(true)) .Selectable() .Groupable() .Filterable().Pageable().DataSource(d => d.Ajax().Pa

  • Pouya
    asp.net-mvc kendo-ui kendo-grid kendo-asp.net-mvc
    I’m starter in kendo.Ui , i write this code for create grid@(Html.Kendo().Grid<BrandViewModel>(Model).Name(“Grid”).Columns(columns =>{columns.Bound(p => p.BrandName);columns.Bound(p => p.BrandAbbr);columns.Bound(p => p.SrcImage);columns.Command(command => command.Custom(“Edit”).Click(“editItem”));}).DataSource(dataSource => dataSource.Ajax().Read(read => read.Action(“CustomCommand_Read”, “Brand”)).Model(model => model.Id(p => p.Id))) )i want when user click in Ed