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

Incell editor isn't removed when selecting multiple cells

4 Answers 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Euan
Top achievements
Rank 1
Euan asked on 07 Feb 2014, 11:51 AM
Hi,

I have come across an issue where when I am using selectable: "multiple, cell", in combination with incell editing the editor is not always removed correctly.

If the incell editor is being displayed and then the user clicks either a single cell or off the grid the editor is correctly removed.
However if the user selects multiple cells then the editor loses focus, but is not removed. This leaves it on the screen.

I have been able to clear the editor by adding a change event to the grid:
change: function (e) {
  this.closeCell();
},

I am a little wary of my workaround as currently have a different issue with manually calling closeCell()
See: http://www.telerik.com/forums/grid-not-activeelement-when-selecting-a-single-cell-when-using-multiple-cell-select

Is this a bug?
Is my workaround correct and likely safe?

Thanks
Euan

4 Answers, 1 is accepted

Sort by
0
Euan
Top achievements
Rank 1
answered on 07 Feb 2014, 03:25 PM
Hi,

Unfortunately the above workaround does not work when using a kendoNumericTextBox as the editor.
Clicking in the input element is ok, but when clicking the up/down arrows the change function fires ans so immediately exits edit mode.

Is there some other workaround or bugfix that I can use to fix the editor when selecting multiple cells?

Thanks
Euan
0
Accepted
Dimiter Madjarov
Telerik team
answered on 10 Feb 2014, 01:03 PM
Hello Euan,


Yes, the current approach is valid. You could modify it by checking if the current selection contains more than one item. This means that a multiple selection was performed and the editor cell should be closed. Otherwise you will be able to edit the current cell.
E.g.
change: function() {
  if(this.select().length > 1) {
      this.closeCell();
  }
}


Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Euan
Top achievements
Rank 1
answered on 10 Feb 2014, 01:22 PM
Hi,

Guarding the closeCell() solved it.

Thanks
EUan
0
Dimiter Madjarov
Telerik team
answered on 10 Feb 2014, 01:49 PM
Hi Euan,


I am glad that all issues are resolved now. Do not hesitate to contact us again if further problems arise.

Have a great day!

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Euan
Top achievements
Rank 1
Answers by
Euan
Top achievements
Rank 1
Dimiter Madjarov
Telerik team
Share this question
or