Hi
Now i am screwed i have to change my entire functionality of datatable .
Now what i need is i need to have a
edit link as a column on every row of data-table . when i click on edit the columns should turn to respective controls i.e text-boxes,drop-downs .
This is my code where i previously dealt with cell wise editing/updating .
CODE:
$(document).ready(function () {
var tab = $('#myDataTable').dataTable({
"oTableTools":
{
"sSwfPath": "../../Content/copy_cvs_xls_pdf.swf"
},
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": 'DataProvider',
"bJQueryUI": true,
"sDom": '<"H"TCfr>t<"F"ip>',
"oTableTools": {
"aButtons": [
{
"sExtends": "copy_to_div",
"sButtonText": "Copy to div",
"sDiv": "copy",
}
]
},
"aoColumns": [
{
"sName": "ID"
, "bVisible" : false
},
{ "sName": "COMPANY_NAME", "sClass": "hidden-xs" ,
"fnRender": function(oObj)
{ return '<a href=\"Home/Details/' + oObj.aData[0] + '\">' + oObj.aData[1] + '</a>';
}
},
{ "sName": "ADDRESS" },
{ "sName": "TOWN" }
});
tab.makeEditable({
"aoColumns": [
null,
null,
{
indicator: 'Saving...',
tooltip: 'Click to select town',
loadtext: 'loading...',
type: 'select',
onblur: 'submit',
loadurl: 'AjaxDataProvider1'
}]
});
});
</script>
PS: Once column edited data Reached controller means i can do everything . I am trying from 4-5 hours continuously still i have no clue :(
Simply above 3 columns(text,text,dropdown) + one edit link column .. ..
Here are the links i tried please once look at this and share you ideas :
https://editor.datatables.net/release/DataTables/extras/Editor/examples/inlineControls.html[
^]
http://datatables.net/media/blog/inline-editing/complete.html[
^]
Regards