Kendo MVC Editable Grid - Numeric TextBox Not working

2 posts, 0 answers
  1. Aarti
    Aarti  avatar
    20 posts
    Member since:
    Mar 2014

    Posted 30 Mar 2015 Link to this post


    I have Kendo MVC editable Grid  with Custom EditorTemplate for Numeric Text Box. For some reason I am getting validation error icon when i  try to update the value in numeric text box as in attached file.

    I am not sure what kind of validation it is triggering as I have only required field validation. Can you pelase help me ASAP on this.

    My model is as below

        public class DocTypesModel
            [Required(ErrorMessage = "required")]
            public int Order { get; set; }

            public int TotalCount { get; set; }

            public string DocumentTypeShortName { get; set; }      


    My grid is as below

                         .Columns(columns =>
                                columns.Bound(c => c.Order).Sortable(false).EditorTemplateName("NumericTextBoxWithLimitsTemplate");
                              columns.Bound(c => c.DocumentTypeShortName).Title("Document Type").Sortable(false);
                          .Editable(e => e.Mode(GridEditMode.InCell))
                          .Events(e => e.DataBound("OnGridDocTypeDataBound").SaveChanges("SaveDocTypeChanges"))
                          .Resizable(resiz => resiz.Columns(false))
                          .DataSource( dataSource =>
                              .Update("Editing_Update", "Bookmark")
                                  .Events(events => events.Error("error_handler"))

    I have created below custom editor for  NumericTextBoxWithLimitsTemplate under /views/shared/EditorTemplates/NumericTextBoxWithLimitsTemplate.cshtml

    @model int

        .HtmlAttributes(new { Style = "width:70px;", required="required"})


  2. Boyan Dimitrov
    Boyan Dimitrov avatar
    2062 posts

    Posted 01 Apr 2015 Link to this post

    Hello Aarti,

    Could you please try using NumercTextBoxFor as shown below:


    @(Html.Kendo().NumericTextBoxFor(m => m)


    Boyan Dimitrov

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top