1
votes

My grid has only 1 column.

Currently, If I enable row dragging, I'm not able to select rows, unless I bind a key to set

supressRowDrag=true

Should be possible and even simple, since the row node is already being selected somehow. (Border gets blue after clicking.)

I want to simultaneously select and start the drag when the row is clicked.

Thanks in advance

1
Hi Pedro. I noticed that you've never upvoted any answers before. If you think an answer is helpful to you, consider upvoting it and accept an answer if it solves your particular problem in the question. Thanks.NearHuscarl

1 Answers

1
votes

Add this props to AgGridReact if you want the rows get selected when the drag begins.

onRowDragEnter={(e) => e.node.setSelected(true)}

Live Demo

Edit 63963503/how-to-select-row-when-drag-start-on-ag-grid-react