How to use angular-bootstrap-toggle with ui.grid

Viewed 320

I'm trying to use http://ziscloud.github.io/angular-bootstrap-toggle/ with http://ui-grid.info/ .

I'm adding the column as :

{
    name: 'Status',
    field: 'active',
    width: 350,
    headerCellClass: 'grid-align-center',
    cellClass: 'grid-align-center',
    cellTemplate:
        '<toggle ng-model="ctrl.active" ng-change="grid.appScope.changed(ctrl.active)" on="Active" off="Inactive" ' +
            'onstyle="btn-success" offstyle="btn-danger" style="ios slow"></toggle>'
}

To gridoptions:

<div ui-grid="ctrl.gridOptions" class="grid" ui-grid-edit ui-grid-row-edit ui-grid-cellNav ui-grid-auto-resize></div>

I can get a mangled version of it to fire changed() by removing width: 200% off the toggle-group class generated by bootstrap-toggle control. The toggle control works just fine without the ui grid. I've tried a lot of different approaches with no luck. I was wondering if there was any way to get these working together?

0 Answers
Related