Note that there are some explanatory texts on larger screens.

plurals
  1. POKendo Grid custom pop up editor & validation
    text
    copied!<p>I have this simple kendo-template script:</p> <pre><code>&lt;!-- popup editor template --&gt; &lt;script id="userEditor" type="text/x-kendo-template"&gt; &lt;div id="popServerErrorSummaryPlaceholder" style="display:none"&gt;&lt;/div&gt; &lt;div class="control-row"&gt; &lt;label class="span2" for="FirstName"&gt;Vorname&lt;/label&gt; &lt;input Id="FirstName" class="span4" data-bind="value:FirstName" maxlength="50" name="FirstName" required="true" type="text" /&gt; &lt;span class="k-invalid-msg" data-for="FirstName"&gt;&lt;/span&gt; &lt;/div&gt; &lt;div class="control-row"&gt; &lt;label class="span2" for="LastName"&gt;Nachname&lt;/label&gt; &lt;input Id="LastName" class="span4" data-bind="value:LastName" maxlength="50" name="LastName" required="true" type="text" /&gt; &lt;span class="k-invalid-msg" data-for="LastName"&gt;&lt;/span&gt; &lt;/div&gt; &lt;/script&gt; </code></pre> <p>Which is used while editing a single row within the Kend-UI grid. I have got right now two issues:</p> <p>a) The <a href="http://docs.kendoui.com/documentation/getting-started/framework/validator/overview#customizing-the-tooltip-position" rel="nofollow noreferrer">documentation</a> states that I can control the position for validation messages via a "span" element that has a class "k-invalid-msg". The behaviour right now is that this span Element gets replaced with a div element and it is positioned below the label element. I would like to get the message next to the input.</p> <p>b) The validation is triggered immediately when the pop up is displayed.The validation should be trigger either when leaving the input or clicking the "update" button.</p> <p>Someone out there who can help me here?</p> <p>Things I am not quite sure how to handle:</p> <p>c) Some validations are performed at the server. I get them back to the browser via the DataSource error event (custom JSON which is basically a list of field name and associated error messages). I would like to display the error messages within the validation span. I can create custom validation rules as documented <a href="http://docs.kendoui.com/api/framework/validator" rel="nofollow noreferrer">here</a>.</p> <p>How do I get the validator that is associated with the pop up editor window? Or is there foreach input a validator created?</p> <p>Anyone did this before?</p> <p>Thanks for any help!</p> <p>Updates:</p> <p>regarding to point a) OnaBai pointed me to the right <a href="https://stackoverflow.com/a/15136842/1802671">direction</a>. Thanks for that.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload