문제

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