Restrict User Input when using AutoComplete inside the Grid

2 posts, 0 answers
  1. Oren
    Oren avatar
    2 posts
    Member since:
    May 2016

    Posted 10 Jun Link to this post


    I am trying to restrict user input of the AutoComplete but the AutoComplete is inside a Kendo UI (MVC) Grid. I successfully implemented the example showing how to restrict user input of an AutoComplete but it does not keep the value cleared when the AutoComplete is inside a Grid. This is the example that I followed:

    Can you please show me how to "Restrict User Input" for the AutoComplete that is inside a Kendo UI (MVC) Grid batch edit mode? The autocomplete is implemented setting an EditorTemplateName bound to a column.



  2. Dimiter Topalov
    Dimiter Topalov avatar
    314 posts

    Posted 15 Jun Link to this post

    Hi Oren,

    You can use the approach from the mentioned example, but you have to configure a change event handler in the Editor template, while it will be best to declare the function handler in the script tag of the main/Grid View, e.g.:

    // Editor template:
    // Grid View
      function onChange (e){
          var found = false;
    var value = this.value();
    var data = this.dataSource.view();
    for(var idx = 0, length = data.length; idx < length; idx++) {
    if (data[idx] === value) {
    found = true;
    if (!found) {
    alert("Custom values are not allowed");

    I hope this helps.

    Dimiter Topalov
    Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
Back to Top