Quantcast
Channel: DataTables 1.10 — DataTables forums
Viewing all articles
Browse latest Browse all 2364

Getting row id, not by clicking but from Keyup event

$
0
0

Hi!

Trying to get the row id, when user clicks enter in an input field on that row.
Changing the selectors do not help... Any suggestions on how to achieve this?

Current code just alerts undefined

$('#datatable tbody input').on( 'keyup change', function (ev) {

                    if (ev.keyCode == 13) {
                
                       alert( 'Row index: '+table.row( this ).id() );
                       return false;
                                     
                                   }
                } );

Thankful


Viewing all articles
Browse latest Browse all 2364

Trending Articles