This question is locked. New answers and comments are not allowed.
Hello.
I've stumbled today with a bug in grid editor that's driving me crazy... I had it in a form on my application, and after two hours looking for it, I decided to check if it was telerik's fault. So, I copied the column template to a simpler test project I had already used before, and the same error pops.
I have this model:
then I have this Index page:
and this is the template for the comment column I'm getting the error on:
Ok .. here's the problem:
When I click edit or Add new record in the grid, the template shows as expected, but if I type anything in any of the two input fields "digitos5" or "digitos3", I get an error in "telerik.grid.editing.js" when the text input loses focus.... the error is:
'removeClass(...).attr(...)' is null or not an object
at telerik.grid.editing.js in a line that reads
I've stumbled today with a bug in grid editor that's driving me crazy... I had it in a form on my application, and after two hours looking for it, I decided to check if it was telerik's fault. So, I copied the column template to a simpler test project I had already used before, and the same error pops.
I have this model:
namespace ComboTest.Models { public class HomeViewModel { public long Id { get; set; } public long ItemId { get; set; } public HomeItem Item { get; set; } [UIHint("CodigoPeticion")] public string Comment { get; set; } } public class HomeItem { public long Id { get; set; } public string Name { get; set; } } } then I have this Index page:
<%@ Page Title="" Language="C#" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="ComboTest.Models"%> <%@ Import Namespace="Telerik.Web.Mvc.UI"%> <head runat="server"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <%= Html.Telerik().StyleSheetRegistrar() .DefaultGroup(group => group.Add("telerik.common.css") .Add("telerik.default.css")) %> </head> <body> <h2>Index</h2> <%=Html.Telerik().Grid<HomeViewModel>() .Name("GridItems") .ToolBar(tb => tb.Insert()) .Pageable(page => page.PageSize(15)) .Sortable(order => order.OrderBy(o => o.Add(e => e.Item.Name)).SortMode(GridSortMode.MultipleColumn)) .Scrollable(scroll => scroll.Height(300)) .DataBinding(db => db.Ajax().Select("_Select","Home") .Update("_Update","Home") .Insert("_Insert","Home") .Delete("_Delete","Home")) .DataKeys(dk => dk.Add(o => o.Id)) .Editable(ed => ed.Enabled(true)) .Columns(cl => { cl.Command(cm => { cm.Edit(); cm.Delete(); }).Width(180); cl.Bound(o => o.Item).ClientTemplate("<#= Item.Name #>").Width(150); cl.Bound(o => o.Comment); })%> <% Html.Telerik().ScriptRegistrar().Render(); %> </body>and this is the template for the comment column I'm getting the error on:
<%@ Import Namespace="Telerik.Web.Mvc.UI"%> <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<string>" %> <div id="CodigoPeticionInversion" style="display:block; white-space:nowrap"> <select name="listaTipos"> <option value=""></option> <option value="OPE">OPE</option> <option value="BIN">BIN</option> <option value="SAL">SAL</option> </select> <select name="listaAnyos"> <option value=""></option> <%for (var i = DateTime.Today.Year; i > DateTime.Today.Year - 5; i--) { %> <option value="<%=i %>"><%=i %></option> <% } %> </select> <input type="text" id="digitos5" maxlength="5" style="width:40px" /> <input type="text" id="digitos3" maxlength="3" style="width:30px" /> <%=Html.HiddenFor(o => Model) %> </div>Ok .. here's the problem:
When I click edit or Add new record in the grid, the template shows as expected, but if I type anything in any of the two input fields "digitos5" or "digitos3", I get an error in "telerik.grid.editing.js" when the text input loses focus.... the error is:
'removeClass(...).attr(...)' is null or not an object
at telerik.grid.editing.js in a line that reads
v.removeClass(
"input-validation-error").attr("_for_validation_message",x).appendTo(x)
Can you try to reproduce this error on your end to confirm the bug?
Cheers!!