ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Cell template using ng-click on rowSelectionEnabled grid

Open Fabryprog opened this issue 12 years ago • 6 comments

Hello everyone,

i have a grid with:

enableRowSelection: true enableRowHeaderSelection: false

In the last cell i am using a button with ng-click event handler.

My grid fired 2 events:

  • selection
  • ng-click

How to avoid cell selection ? I need only ng-click event!!!

NOTE: if i use enableRowHeaderSelection: true attribute, it is all ok!

CODE: http://plnkr.co/edit/oAm3Zm

Fabryprog avatar Nov 24 '14 13:11 Fabryprog

+1

Fabryprog avatar Dec 02 '14 07:12 Fabryprog

You can use a css rule to disable user selection see here http://stackoverflow.com/questions/826782/css-rule-to-disable-text-selection-highlighting I hope that helps

novice3030 avatar Dec 02 '14 07:12 novice3030

Thanks, but your solution not resolve my problem.

It isn't only CSS problem but it is functionality problem.

my code (see plunker) fire 2 events:

  • selection
  • ng-click

I would fire only ng-click!

Fabryprog avatar Dec 02 '14 07:12 Fabryprog

+1

gaetanoserio avatar Dec 02 '14 07:12 gaetanoserio

Try using '$event.stopPropagation();' before the actual method invocation.

zuberpalekar avatar Dec 02 '14 16:12 zuberpalekar

Solution provided that sounds like it would resolve the issue, no response for a few months, assuming issue is resolved.

PaulL1 avatar Mar 28 '15 21:03 PaulL1