How to force user to input only items on Combobox

2 posts, 0 answers
  1. Nurali
    Nurali avatar
    16 posts
    Member since:
    Oct 2010

    Posted 04 Dec 2013 Link to this post

    Hello ,i m using Kendo grid with pop-up edit mode.I have created custom template page for pop-up window.On this template there are some comboboxes.
    I want user that can input(on combo's textarea)  only from combobox's value.


    Combobox-Values: red,yellow,green

    When user fill the combobox's textarea like "RED" or "Yellow" validator message should appears and ,update button should return false such required = "required"
    does on combobox.

                             //.Events(e => e<br>
                             //               .Change("combobox_select"))<br>
                        .DataTextField("DESCRIPTION").HtmlAttributes(new { style = "width:220px", required = "required" })<br>
                                        //   .Value(Model.IDTYPEGUID.ToString()) // Initial value<br>
                                        //  .BindTo(Model.IDTYPE) <br>
                                        //.AutoBind(true)   <br>
                            .DataSource(source =><br>
                                source.Read(read =><br>
                                    read.Action("GetDefinitionDetails", "Definition", new { definitionCode = "IDTYPE", addEmptyRow = false })<br>
                                        //  .Data("onAdditionalData")<br>
  2. Alexander Popov
    Alexander Popov avatar
    1411 posts

    Posted 05 Dec 2013 Link to this post

    Hi Nurali,

    In the current scenario I would recommend you to initialize a KendoUI Validator and define a custom rule that checks if the ComboBox widget has a valid dataItem. You can find additional information on that topic here.

    Alexander Popov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. UI for ASP.NET AJAX banner
Back to Top