Position of validation message using mvc-wrapper in custom editor

2 posts, 0 answers
  1. Juergen
    Juergen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 23 Sep 2015 Link to this post

    Hi,

    i'm using a kendo grid like this one

    @(Html.Kendo().Grid<KUB.Expert.Web.Models.HandlungsradiusViewModel>()
    .....
    .Editable(editable => editable
            .Mode(GridEditMode.PopUp)
            .TemplateName("HandlungsradiusEditor")
            .Window(w => w.Width(600)))
    ...:

    My editortemplate looks like this ...

    <div class="form-horizontal">
        <div class="form-group">
            @Html.LabelFor(m => m.Name, new { @class = "col-xs-2 control-label" })
            <div class="col-xs-8">
                @(Html.Kendo().TextBoxFor(m => m.Name).HtmlAttributes(new {@style = "width:400px"}))
            </div>
            <span data-for="Name"></span>
        </div>
    .....

    ......
    </div>

    Everthing works fine but the validation-message for the textbox is not rendered in <span>...</span>. The validation message are shown in a div below the input.

    The validation-message should be rendered like described here http://docs.telerik.com/kendo-ui/framework/validator/overview#customizing-the-tooltip-position

     

    What do i wrong ?

    Regards

     

    Jürgen

     

  2. Juergen
    Juergen avatar
    12 posts
    Member since:
    Sep 2013

    Posted 23 Sep 2015 in reply to Juergen Link to this post

    Found my error.

     <span class="k-invalid-msg" data-for="Name"></span>

    I have to use class k-invalid-msg additional in my span. 

     

  3. Kendo UI is VS 2017 Ready
Back to Top