My Code is like below, I have a json like below, when the json object have PQ then PQ coumn check box should be checked and the same for FG. Now when user wants to update a row then how will I know that row values after update (check box updations) . How to catch next column checkbox state?
[{
"id": 1001,
"name": "TC1",
"usedIn": ["PQ"]
}, {
"id": 1002,
"name": "TC2",
"usedIn": ["PQ","FG"]
}, {
"id": 1003,
"name": "TC2",
"usedIn": ["FG"]
}];
<wj-flex-grid auto-height="" allow-resizing="Both" additional-height="40" selection-mode="Row" is-read-only="false" items-source="vm.technicalCritrions" control="vm.flex" item-formatter="itemFormatter">
<wj-flex-grid-column header="PQ" width="*" binding="usedIn">
<wj-flex-grid-cell-template cell-type="Cell">
<input type="checkbox" ng-checked="$item.usedIn.indexOf('PQ')>-1" ng-click="vm.PQ($item,$event,$row,$col,vm.flex)" />
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
<wj-flex-grid-column header="FG" width="*" binding="usedIn">
<wj-flex-grid-cell-template cell-type="Cell">
<input type="checkbox" ng-checked="$item.usedIn.indexOf('FG')>-1" ng-click="vm.FG($item,$event,$row,$col,vm.flex)" />
</wj-flex-grid-cell-template>
</wj-flex-grid-column>
<wj-flex-grid-column format="D" binding="id" width="*"></wj-flex-grid-column>
<wj-flex-grid-column header="{{'global.titles.name' | translate}}" binding="name" width="*">
<b>{{$item.name}}</b>
</wj-flex-grid-column>
</wj-flex-grid>
Aucun commentaire:
Enregistrer un commentaire