This is a migrated thread and some comments may be shown as answers.

Position of validation message using mvc-wrapper in custom editor

1 Answer 83 Views
Validation
This is a migrated thread and some comments may be shown as answers.
Juergen
Top achievements
Rank 1
Juergen asked on 23 Sep 2015, 08:30 AM

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

 

1 Answer, 1 is accepted

Sort by
0
Juergen
Top achievements
Rank 1
answered on 23 Sep 2015, 08:40 AM

Found my error.

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

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

 

Tags
Validation
Asked by
Juergen
Top achievements
Rank 1
Answers by
Juergen
Top achievements
Rank 1
Share this question
or