swimlane / ngx-datatable

✨ A feature-rich yet lightweight data-table crafted for Angular
http://swimlane.github.io/ngx-datatable/
MIT License
4.63k stars 1.68k forks source link

How to make row active on mouse right click? #501

Open webmatrixxxl opened 7 years ago

webmatrixxxl commented 7 years ago

I'm submitting a ... (check one with "x")

[ ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[x] support request => Please do not submit support request here

I'm wondering if there is a way to set row active on right click ? Sorry if this i not for here and thank you!

amcdnl commented 7 years ago

No there is not currently, we should probably add a new selection type for this https://github.com/swimlane/ngx-datatable/blob/master/docs/api/table/inputs.md#selectiontype

joachim-bl commented 7 years ago

There is currently a strange behaviour, when you right click on a row that is not selected (to open context menu) the row is not selected, but only the column in the row without unselecting already selected rows (I am using selectionType 'multi'). Windows Explorer always selects the right clicked row before opening context menu. Could this behaviour implemented in ngx-datatable? Or is there a way to easily get the item of the right clicked row in the mousedown event?

VaniKiran commented 6 years ago

Hi, I am also looking for selecting a row on right click. any help to achieve this is greatly appreciated.

Thank you

mohamednasr commented 5 years ago

I was facing the same problem, i have done it by using the Output (tableContextmenu) and call a function to show my context menu then inside this function i used to push the element to the selectedList so it become selected.