title: Angularjs datatables - rowCallback event
body: <p>can someone help me with rowCallback. Problem is, I have a table, and you can click anywhere on table row for open info for clicked item. On first TD I set check box. But when I check checkbox, I don't want to open info. 
  Here is image for better explanation
  <a href="https://i.stack.imgur.com/f8nBM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f8nBM.jpg" alt="enter image description here"></a></p>
  
  <p>my code</p>
  
  <pre><code>var vm = this;
      vm.selected = {};
      vm.selectAll = false;
      vm.toggleAll = toggleAll;
      vm.toggleOne = toggleOne;
  
      var titleHtml = '&lt;input type="checkbox" ng-model="showCase.selectAll" ng-click="showCase.toggleAll(showCase.selectAll, showCase.selected)"&gt;';
  
  
      function getUserTokenFromLocalStorage(localStorage) {
          var authData = [];
          for (key in localStorage) {
              if (key == "ls.authorizationData") {
                  authData = localStorage[key];
              }
  
          }
  
          var jsonObj = JSON.parse(authData);
          return jsonObj.token;
      };
  
  
      var vm = this;
      vm.message = '';
      vm.someClickHandler = someClickHandler;
      vm.dtOptions = DTOptionsBuilder.newOptions()
          .withOption('ajax', {
              // Either you specify the AjaxDataProp here
              // dataSrc: 'data',
              url: serviceBase + 'test',
              type: 'POST',
              headers: {
                  'xtoken': 'Bearer ' + getUserTokenFromLocalStorage(localStorage)
              }
          })
          // or here
          .withDataProp('data')
          .withOption('processing', true)
          .withOption('serverSide', true)
          .withOption('rowCallback', rowCallback)
          .withOption('createdRow', function(row, data, dataIndex) {
              // Recompiling so we can bind Angular directive to the DT
              $compile(angular.element(row).contents())($scope);
          })
          .withOption('headerCallback', function(header) {
              if (!vm.headerCompiled) {
                  // Use this headerCompiled field to only compile header once
                  vm.headerCompiled = true;
                  $compile(angular.element(header).contents())($scope);
              }
          })
          .withPaginationType('full_numbers')
  
  
      vm.dtColumns = vm.dtColumns = [
          DTColumnBuilder.newColumn(null).withTitle(titleHtml).notSortable()
          .renderWith(function(data, type, full, meta) {
              vm.selected[full.id] = false;
              return '&lt;input type="checkbox" ng-model="showCase.selected[' + data.id + ']" ng-click="showCase.toggleOne(showCase.selected)"&gt;';
          }), //don't change state when click on this TD, only check checkbox.
          DTColumnBuilder.newColumn('id').withTitle('ID'),
          DTColumnBuilder.newColumn('type').withTitle('Type'),
          DTColumnBuilder.newColumn('city').withTitle('City'),
          DTColumnBuilder.newColumn('country').withTitle('Country'),
          DTColumnBuilder.newColumn('last_report_dt').withTitle('Last report'),
          DTColumnBuilder.newColumn('hardware_version').withTitle('HW version'),
          DTColumnBuilder.newColumn('rpi_image_version').withTitle('Image version'),
          DTColumnBuilder.newColumn('software_version').withTitle('Code version'),
          DTColumnBuilder.newColumn('internal_note').withTitle('Internal note'),
          DTColumnBuilder.newColumn(null).withTitle('Info').notSortable()
          .renderWith(function(data, type, full, meta) {
              vm.selected[full.id] = false;
              return '&lt;a class="btn btn-default" ng-href="info/' + data.id + '"&gt;Info&lt;/a&gt;';
          }),
      ];
  
      function toggleAll(selectAll, selectedItems) {
          for (var id in selectedItems) {
              if (selectedItems.hasOwnProperty(id)) {
                  selectedItems[id] = selectAll;
              }
          }
      }
  
      function toggleOne(selectedItems) {
          for (var id in selectedItems) {
              if (selectedItems.hasOwnProperty(id)) {
                  if (!selectedItems[id]) {
                      vm.selectAll = false;
                      return;
                  }
              }
          }
          vm.selectAll = true;
      }
  
  
      function someClickHandler(info) {
          vm.message = info.id;
          $location.path('info/' + info.id);
  
      }
  
      function rowCallback(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
          // Unbind first in order to avoid any duplicate handler (see https://github.com/l-lin/angular-datatables/issues/87)
          $('td', nRow).unbind('click');
          $('td', nRow).bind('click', function() {
              $scope.$apply(function() {
                  vm.someClickHandler(aData);
              });
          });
          return nRow;
      }
  
  
  }
  </code></pre>