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

Grid lock column problem

1 Answer 235 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Salim
Top achievements
Rank 1
Salim asked on 26 Mar 2018, 01:05 PM
When having a locked column positioned at the end of the grid, when trying to edit the locked column the editCell event will fire with a  wrong columnIndex

Below is the a reproduction of the case :
https://plnkr.co/edit/KMJv6BUddzaOF1LRTWCx?p=preview
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimiter Topalov
Telerik team
answered on 28 Mar 2018, 06:10 AM
Hi Salim,

Thank you for bringing this issue to our attention. Indeed, the columnIndex, passed to the cellClick event handler is correct, but the editCell() method treats the received index as though it is for the non-locked table only (there are two tables rendered when there are locked columns - one for them, and one for the scrollable table that contains the rest of the non-locked columns).

I have logged an issue to our GitHub repository and you can track it here:

https://github.com/telerik/kendo-angular/issues/1414

Until the bug is fixed, you can pass the column.field to the editCell method instead of the columnIndex:

public cellClickHandler({ sender, rowIndex, columnIndex, dataItem, isEdited, column }) {
      console.log(columnIndex)
        if (!isEdited) {
            sender.editCell(rowIndex, column.field, this.createFormGroup(dataItem));
        }
    }

https://plnkr.co/edit/MCFXuSFAEJnkaMjKzWGS?p=preview

I hope this helps, and I apologize for any inconvenience this issue has caused. I also updated your Telerik points for reporting the problem.

Regards,
Dimiter Topalov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
Salim
Top achievements
Rank 1
Answers by
Dimiter Topalov
Telerik team
Share this question
or