hi guys,how to edit added rows in datatables?
hi guys,how to edit added rows in datatables?
newbie with datatables, I need to add a new row for datatable,and still I need to edit the row cells, what should I do ?
Here's my codes,however it won't alert after I click OK.
[code]
function add()
{
//alert("add a row!");
oTable.fnAddData([
'da',
'edit',
]);
$('td:eq(1)', oTable.fnGetNodes()).editable(function(sValue,settings){
var aPos = oTable.fnGetPosition( this );
var row=aPos[0];
var col=aPos[2];
aaData[row][col]=sValue;
alert(sValue);
return sValue;
},
{
type : 'textarea',
submit: 'OK',
cancel: 'cancel'
}
);
}
[/code]
Here's my codes,however it won't alert after I click OK.
[code]
function add()
{
//alert("add a row!");
oTable.fnAddData([
'da',
'edit',
]);
$('td:eq(1)', oTable.fnGetNodes()).editable(function(sValue,settings){
var aPos = oTable.fnGetPosition( this );
var row=aPos[0];
var col=aPos[2];
aaData[row][col]=sValue;
alert(sValue);
return sValue;
},
{
type : 'textarea',
submit: 'OK',
cancel: 'cancel'
}
);
}
[/code]
This discussion has been closed.