Quantcast
Viewing all articles
Browse latest Browse all 82111

Having an inline drop down that does a server side update

I am new to the DataTables plugin.
I am loving it so far.

I need to be able to have a drop down at the end of my grid which is visible for all rows.
When the user select this, I need to be call server side code to update my database.

So far i use the following to have the drop down, but I am not sure on the best way to know which row the user selected the drop down.

fnRender : function(oObj) {
return '<select id="mychoice">' + '<option value="">Select...</option>' + '<option value="1">Yes</option>' + '<option value="0">No</option>' + '</select> ';
}}

Would I use fnRowCallback or is there a way to do pass the for id into the name of my select and then use the .live function:
$('#mychoice').live('change', function (event) { alert('test'); });

Viewing all articles
Browse latest Browse all 82111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>