I need to replace the UI grid selection header content with a regular checkbox instead of default OK button. I was able to insert checkbox but I am not able to control the row checkbox value based on column header checked checkbox. Requirement: When the column header checkbox is selected, all the row checkboxes should be selected. When a row checkbox is unselected then the column header checkbox should be unselected.
Select/unselect checkbox works but I should be able to control the row checkbox based on column header checkbox.
I am struggling with scope here. Any help/suggestion is appreciated.
Plunker Link: http://plnkr.co/edit/Ji7gLbfQTohnEj04mYFM?p=preview
$templateCache.put('ui-grid/selectionRowHeaderButtons',
"<div class=\"ui-grid-selection-row-header-buttons \" ng-class=\"{'ui-grid-row-selected': row.isSelected}\"><input style=\"margin: 0; vertical-align: middle\" type=\"checkbox\" ng-model=\"rowSelected\" ng-click=\"grid.appScope.clickConditionRow(rowSelected) && selectButtonClick(row, $event)\"> </div>"
);