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

Kendo Textbox Helper

4 Answers 1494 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
MiracleMan
Top achievements
Rank 1
MiracleMan asked on 10 Sep 2015, 12:18 AM

Hello all, 

 I'm evaluationg the controls for my application and I'm currently stuck in something really stupid.  I'm using the Kendo Textbox helper and added the required attribute like this:

 

@(Html.Kendo().TextBox()
         .Name("LastName01")
         .HtmlAttributes(new { placeholder = "Apellido Paterno", required = "required", validationmessage = "Enter {0}", @class = "col-sm-2 form-control" })
            )
<span data-for='LastName01' class='k-invalid-msg'></span>

 

But the position of the valition message is off, how can I get it under the textbox?  Attached is the screen shot.

4 Answers, 1 is accepted

Sort by
0
MiracleMan
Top achievements
Rank 1
answered on 11 Sep 2015, 02:02 AM
Any help?
0
Plamen Lazarov
Telerik team
answered on 11 Sep 2015, 02:39 PM

Hello MiracleMan,

When a validation message container is added manually (as in your case), Kendo UI does not apply any positioning styles to it by design. The idea is that the developer would position that element, according to the specific scenario and context. That being said, you can either wrap it in a block element (if applicable) or use custom CSS to position the validation message container at the desired position.

Regards,
Plamen Lazarov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
MiracleMan
Top achievements
Rank 1
answered on 11 Sep 2015, 03:23 PM

i dont understand, sorry.   When you say "validation message container", do you mean the span ?  I added that one after reading another article.  The problem persist even if I remove it. All in the same location. It is applying a k-tooltip class and a custom style with a margin of .5em somewhere.  If I modifiy my stylesheet, it wont allow me to overide it because of the manual style that somewhere is getting.  The span does not shows anywhere, it creates a div an the me validation messages goes into that div.

 

Thanks for any help.

0
Plamen Lazarov
Telerik team
answered on 15 Sep 2015, 02:21 PM

Hello MiracleMan,

Yes, by validation message container I mean the <span> element. Ideally, the Kendo UI Validator places its tooltips next to the validated input. I noticed that in the provided screenshot there is not enough space for the validation message container (i.e. the <span>) and this breaks the layout.

As mentioned before, manually added validation message containers should be positioned with custom CSS by the developer, according to the specific scenario. However, as an exception, if you send us a runnable project, we can suggest how to achieve the desired positioning.

Regards,
Plamen Lazarov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
MiracleMan
Top achievements
Rank 1
Answers by
MiracleMan
Top achievements
Rank 1
Plamen Lazarov
Telerik team
Share this question
or