Behaviour of fnDeleteRow changed from v1.7.0
Behaviour of fnDeleteRow changed from v1.7.0
zzsu
Posts: 2Questions: 0Answers: 0
With v1.6.x, when delete a row by fnDeleteRow, for example fnDeleteRow[2], you can then delete the next row by fnDeleteRow[3].
With v1.7.x, you must call fnDeleteRow[2] again in order to delete the next row.
Is this behaviour intentional?
(I have registered a triger with fnRender for each row, I get oObj.iDataRow for fnDeleteRow using.)
[code]
...
{"fnRender": function(oObj){return fnRenderRemoveLink(oObj, '${url.for("%{action='removecomponent'}")}');}, "bSortable": false}
...
function fnRemove(sUrl, id, iRow)
{
jQuery.post(sUrl, {id: id}, function(data){
if(!fnHasError(data)){
oDataTable.fnDeleteRow(iRow);
}
}, 'json');
}
function fnRenderRemoveLink(oObj, sUrl)
{
var link = "
With v1.7.x, you must call fnDeleteRow[2] again in order to delete the next row.
Is this behaviour intentional?
(I have registered a triger with fnRender for each row, I get oObj.iDataRow for fnDeleteRow using.)
[code]
...
{"fnRender": function(oObj){return fnRenderRemoveLink(oObj, '${url.for("%{action='removecomponent'}")}');}, "bSortable": false}
...
function fnRemove(sUrl, id, iRow)
{
jQuery.post(sUrl, {id: id}, function(data){
if(!fnHasError(data)){
oDataTable.fnDeleteRow(iRow);
}
}, 'json');
}
function fnRenderRemoveLink(oObj, sUrl)
{
var link = "
This discussion has been closed.
Replies
To get around this... What you can do is to pass the TR element you want to be deleted into the fnRemove function. To do this, it's probably easier to use jQuery events, rather than DOM0 events (those it is possibly, you just need to use the event object and get the targetNode, and rather it back up to the TR).
Allan
i have a problem with fnDeleteRow.
After fnDeleteRow the Datatable always redraw the Datatable and got new position.
It is possible that Datatable not got new position ???
i use in 1.6 fnDeleteRow(pos, null, true); that is not possible in 1.7.
Hans