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