javascript - How to respond to the user selecting a row in jQuery.dataTables? -
javascript - How to respond to the user selecting a row in jQuery.dataTables? -
i'm writing web application using jquery.datatables. i'm sure did time before, i'm having problem figuring out proper way create page respond user clicking on row.
the basic thought want able respond click on row showing user more info row. invoke function when row clicked. may need place 1 or more buttons in each row can clicked on row-specific functionality, such navigate form edit or delete row.
$('#tbldata').datatable({ data: data, columns: columns, // column names specified bfilter: false, bpaginate: false, binfo: false });
i have thought "events" reference might reply (http://www.datatables.net/reference/event/), haven't had such luck.
to place event on table's row utilize .on method:
$("#tbldata").on('click','tbody > tr',function(e){ });
then, if place buttons within rows, can same thing using button selectors. create sure utilize e.stoppropagation() in button click maintain row click firing.
javascript jquery datatables
Comments
Post a Comment