How to get the cell value from ng-grid

前端 未结 3 2034
被撕碎了的回忆
被撕碎了的回忆 2021-01-06 03:06

I am a beginner of AngularJS. I study the demo of ng-grid and have a question.

index.html






        
3条回答
  •  無奈伤痛
    2021-01-06 03:57

    Acutally, I want to get a cell value and modify when user selects the cell at the table.

    Above answers are using fixed columns's filed.. like

     $scope.selectedIDs.push( item.id ) // id is column filed
    

    Instead of these answers, I found another way exactly what I want to achieve with.

    Example code: http://plnkr.co/edit/wfiMhlJ7by4eUHojjKT4?p=preview

    editableCellTemplate which is an option for columnDefs is used for solving this problem.

    Angular is Aswome!!

提交回复
热议问题