why cell editing with dropdownlist causing the cell close

2 posts, 0 answers
  1. Jones
    Jones avatar
    1 posts
    Member since:
    Oct 2008

    Posted 23 May 2017 Link to this post

    I have a grid with editable incell, when edit the cell, I make the dropdownlist with it, but it will close immidiately, it is work with version 2014.1.415 ,  but not work with 2017.2.504

    <script>
      var ops = [ { Value: "Match", Text: "Match" },
                    { Value: "Any", Text: "Any" }];
      var operator;
       function changeOperator(e, obj, operator){
         
         e.container.find("input[name='oper']").kendoDropDownList({
                            optionLabel: "Select",
                            dataTextField: "Text",
                            dataValueField: "Value",
                            dataSource: operator          
                        });
                      
                            
        }
    $("#grid").kendoGrid({
      columns: [
        { field: "oper"},
        { field: "val" }
      ],
      dataSource: {
        data: [
          { id: 1, oper: "Match", val: 30 },
          { id: 2, oper: "Match", val: 33 }
        ],
        schema: {
          model: { id: "id" }
        }
      },
      editable: "incell",
      edit: function(e) {
        operator = [ops[0], ops[1]];
        changeOperator(e, "", operator);
      },
      
    });
    </script>

    here is my code in dojo

    http://dojo.telerik.com/iguti/2

    anyone could tell me why?

    thanks a lot.

     

     

  2. Preslav
    Admin
    Preslav avatar
    571 posts

    Posted 24 May 2017 Link to this post

    Hello Jones,

    In order to achieve this functionality, I would suggest following the approach outlined in this demo:

    http://demos.telerik.com/kendo-ui/grid/editing-custom

    Regards,
    Preslav
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top