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

Validation tooltip with hard coded margin

1 Answer 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
guru
Top achievements
Rank 1
guru asked on 28 Feb 2013, 01:35 PM
I have a popup editor for a grid

<

 

 

script id="TopRoleEditorTemplate" type="text/x-kendo-template">

 

<table >

<tr>

<td align="right">

<label for="RoleCode" class="k-Label">

<span id="rolename" style="padding: 0px 1px 0px 1px; font-family: Verdana; color: Red; font-size:xx-small; font-weight:bold">* </span>

Service Owner Group:</label>

</td>

<td>

<input type="RoleCode" id="RoleCode" name="RoleCode" class="k-textbox" style="width: 200px" data-bind="value:RoleCode"

required validationMessage="Service Owner Group is required" />

 

 

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

 

 

</td>

</tr>

when the popup is submitted i can see a div is generated with a hard coded margin (0.5em) , becuase of this the validation message appears away from (not inline) the input control

<div class="k-widget k-tooltip k-tooltip-validation k-invalid-msg" role="alert" style="margin: 0.5em; display: block;" jQuery18206744028167790009="318" data-for="RoleScope">

how do i override the margin?

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 04 Mar 2013, 02:06 PM
Hello Guru,

Kendo Validator uses validation tooltips to indicate the invalid fields. Inline (inside the input) displaying of the warning messages is not supported. The margin that you refer to is added on purpose and I would not recommend modifying it. Actually even if you remove it completely with JavaScript, the message will not appear inside the input.
If you wish you can write a custom validation message function which will let you to change the default behaviour. I hope this information will help.

Kind regards,
Alexander Valchev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
guru
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or