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'); });
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'); });