最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - ag-grid: Get double clicked row data within a multiple selection - Stack Overflow

programmeradmin1浏览0评论

in my grid I would like to have a multiple selection, but I want only the actually double clicked row to be used in a certain event. So, getSelectedRows() couldn't do the job (at least used alone).

Any ideas?

in my grid I would like to have a multiple selection, but I want only the actually double clicked row to be used in a certain event. So, getSelectedRows() couldn't do the job (at least used alone).

Any ideas?

Share Improve this question asked Dec 12, 2016 at 11:19 Igino BoffaIgino Boffa 4512 gold badges7 silver badges26 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 14

Are you looking for the event rowDoubleClicked?

https://www.ag-grid.com/javascript-grid-events/

It's used like so:

gridOptions = {
    onRowDoubleClicked: doSomething
}

function doSomething(){
    alert('I did something')
}

The even will also pass the row data if you want to use that in the function:

gridOptions = {
    onRowDoubleClicked: doSomething
}

function doSomething(row){
    console.log(row);
    console.log(row.data);
}
发布评论

评论列表(0)

  1. 暂无评论