0
我是新來的角js。我想選中複選框,當我點擊行來編輯特定的cell.I已採取celltemplate顯示在ui網格中的複選框。但現在當我點擊該行獲取選中的行,但複選框在該行未被選中。使用angularjs在行中點擊複選框使用ui-grid
這是我的併網
$scope.myDataSocailMediaMarketing =[];
$scope.gridOptionsSocialMediaMarketing = {
appScopeProvider: $scope,
data : 'myDataSocailMediaMarketing' ,
// enableCellSelection: true,
// enableRowSelection: false,
enableRowHeaderSelection :false,
enableRowSelection: true,
enableCellEdit: true,
enableHorizontalScrollbar: 0,
enableRowSelection: true,
enableSelectAll: true,
enableFullRowSelection : true,
rowEditWaitInterval: -1,
columnDefs: [
{
cellClass : 'grid-align',
width : '10%',
minWidth : '10%',
enableCellEdit: false,
field: 'select',
displayName: me.labelText.ADD_STORY_TABLE_SELECT,
cellTemplate: '<div class="ngCellText text-center">'+
'<input type="checkbox" '+
'ng-model="row.entity.select" '+
'ng-click="grid.appScope.checkboxRowClick(row.entity)""/>'+
'</div>'
},
{
cellClass : 'grid-align',
width : '30%',
minWidth : '30%',
enableCellEdit: false,
field: 'category',
displayName: me.labelText.ADD_STORY_TABLE_CATEGORY
},
{
cellClass : 'grid-align',
width : '60%',
minWidth : '60%',
enableCellEdit: true,
field: 'descriptionOrExample',
displayName: me.labelText.ADD_STORY_TABLE_DESCRIPTION
}
],
};
在HTML我已經宣佈它原樣
<div>
<div class="gridHeightSocialMarketing socialMediaMarketing table" ui-grid-edit ui-grid-row-edit ui-grid-selection ui-grid="gridOptionsSocialMediaMarketing" style="height:242px;">
</div>
</div>
謝謝你的偉大help.I將通過教程。 –