how to get selected row from form button?
how to get selected row from form button?
How do i get selected rows from the grid on my form button?
when i selected a few rows on the grid and click on a button like "Lookup", i am able to do an ajax post call to my php code but where do i get the selected row data on my php code?
this is my ajax call
$.ajax({
type: 'POST',
'headers': {'X-CSRF-TOKEN': 'uTKwGdKrCYoOAL06imtREZ7WJUk839kRUwKcSxFa'},
data: $(this).serialize(),
error: function (jqXHR, textStatus, errorThrown) {
alert("error" + jqXHR + " : " + textStatus + " : " + errorThrown);
},
url: '/lookup/2'
})
$data = Input::all();
when i do a var_dump( $data );
i get empty.
This question has an accepted answers - jump to answer
Answers
it simple if you have the selection plugin. You can see it work here: http://live.datatables.net/zamoqohu/1/edit
Event better is to use the
selected
option of theselector-modifier
option:That removes any dependence on the DOM.
See also the manual for this information.
Allan