question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not able to do highlight selected row

See original GitHub issue
function rowCallback(nRow, aData) {
  $('td', nRow).unbind('click');
  $('td', nRow).bind('click', function () {
    $scope.$apply(function () {
      $scope.catalogs.someClickHandler(aData);
    });
  });
  return nRow;
}

I am able to grab value of selected row but not able to highlight s=that row using some background color.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
dashawkcommented, Aug 8, 2016

Here’s another way:

Instead of using rowCallback, try using createdRow instead.

    config.withOption('createdRow', function (row, data, index) {
        row.setAttribute('ng-class', '{ highlight: YOUR_CONDITION }');
        row.setAttribute('ng-click', 'catalogs.someClickHandler(data)');
        $compile(row)($scope);
    })

YOUR_CONDITION should be set inside your someClickHandler().

0reactions
metucommented, Jul 22, 2016

Is a whole plugin really necessary just to highlight a selected row using an Angular approach??

Read more comments on GitHub >

github_iconTop Results From Across the Web

Highlight the Active Row and Column in a Data Range in Excel
Select the data set in which you to highlight the active row/column. · Go to the Home tab. · Click on Conditional Formatting...
Read more >
How to highlight active row and column in Excel - Ablebits
Select your dataset in which the highlighting should be done. On the Home tab, in the Styles group, click New Rule. In the...
Read more >
Excel tricks to highlight selected row, column, heading and more
The main trick is to make Excel recalculate the worksheet whenever you switch to another cell. Normally, Excel only recalculates when there's a ......
Read more >
Use this SIMPLE TRICK to Highlight a Selected Row in ...
Use this SIMPLE TRICK to Highlight a Selected Row in Microsoft Excel ; Save Up To 35% On EVERY Course For Xmas: https://bit.ly/XmasYTDesc2022 ......
Read more >
How to highlight selected row / column / column and row in ...
1. Select a cell which you want to highlight the column and row, then, click Kutools > Reading Layout, and the column and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found