Вопрос

I have grid implemented using ngGrid, and now I want to make it editable only if the row is selected using checkBox is checked, how to find whether the checkbox is checked or not in ngGrid to make cells in that row editable ? I just want the cells in the selected rows are only editable, others should be non-editable.

Это было полезно?

Решение

The quick way to do this in v2 is to set

cellEditableCondition: 'row.selected'

in your grid options. See Plunker here. If you use this method, though, you should not use enableCellEditOnFocus, because a single click will cause each clicked cell to be open for editing as soon as the row is selected. I believe this is a bug, but likely won't be resolved in v2.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top