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

why cell editing with dropdownlist causing the cell close

1 Answer 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jones
Top achievements
Rank 1
Jones asked on 23 May 2017, 08:47 AM

I have a grid with editable  when the cell, I make the with it, but it will close immidiately, it is work with version   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.

 

 

1 Answer, 1 is accepted

Sort by
0
Preslav
Telerik team
answered on 24 May 2017, 01:24 PM
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.
Tags
Grid
Asked by
Jones
Top achievements
Rank 1
Answers by
Preslav
Telerik team
Share this question
or