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

ui-grid-selection: add click event to entire row

Open priceld opened this issue 11 years ago • 6 comments

We are using a grid where the viewport can be wider than the total width of all visible columns. In this case it would be very useful to be able to click anywhere on the row to select it, not just in the columns themselves.

Here's a quick plunkr I threw together (based on the example from the selection tutorial) that demonstrates this: http://plnkr.co/edit/Sq0ziKH6Q1Jf84clXII9?p=preview

Clicking anywhere to the right of the "Address.City" column does nothing. It would be nice if this still selected the row.

Looking at the code, there doesn't seem to be much cell-specific code in ui.grid.selection.directive:uiGridCell so I would think it would be pretty simple to pull the selection logic out and extended the uiGridRow directive instead.

priceld avatar Feb 26 '15 14:02 priceld

A good idea, but probably not a priority for the core team given the other issues we have to work on. But we'd probably welcome a PR that addressed this.

PaulL1 avatar Feb 27 '15 08:02 PaulL1

Thanks @PaulL1, I understand it's not pressing. If I can find the time I'll try to work on it.

priceld avatar Feb 27 '15 19:02 priceld

I have implemented this today, refer the selection tutorial.

PaulL1 avatar May 27 '15 07:05 PaulL1

how can i get selected row value and on-click in row redirect another page

http://plnkr.co/edit/Ma84YHvWt6JVuRRnbWLX?p=preview

Gajendrasinh avatar Dec 19 '15 06:12 Gajendrasinh

Hello,

I have installed the 3.0.7 version of angular-ui-grid, and I want to allow both clicking on the row, and also clicking on the rowHeader. If I set enableFullRowSelection to true, the row can be selected only by clicking on the row, and the rowHeader is disabled. If it's set to false, you can select a row only by clicking on the rowHeader. The same issue appears in 3.0.6, but it's working on 3.0.5 and below. Is there a fix, or I should use the 3.0.5 version ?

boogdanpop avatar Jan 11 '16 14:01 boogdanpop

hello everyone,

From the documentation : "If you want to allow both clicking on the row, and also clicking on the rowHeader, you can set enableFullRowSelection to true." But its not working in the latest versions. The last supported version was 3.0.5. thanks to @boogdanpop for mentioning. Please fix this issue in the future release. UI grid rocks :)

sandeep206 avatar Jun 17 '16 09:06 sandeep206