Issue regarding overflow condition in "fnDeleteRow" function
Issue regarding overflow condition in "fnDeleteRow" function
debasish88
Posts: 1Questions: 0Answers: 0
I think the 'overflow' condition in the fnDeleteRow function is not correct.
The condition is like this
[code]
if ( oSettings._iDisplayStart >= oSettings.aiDisplay.length ) {
oSettings._iDisplayStart -= oSettings._iDisplayLength;
if ( oSettings._iDisplayStart < 0 ) {
oSettings._iDisplayStart = 0;
}
}
[/code]
I am facing problem when I am in (say) 3rd page and trying to delete a row. My oSettings._iDisplayStart is 200 and oSettings.aiDisplay.length is 96(as I am trying to delete 96th row of 3rd page). In this condition, it is reducing the oSettings._iDisplayStart by 100(oSettings.aiDisplay.length) which is not required as this is not an overflow condition.
A possible overflow condition could be
[code]
if ( oSettings._iDisplayStart + 1 == oSettings._iRecordsTotal )
[/code]
Am I missing out on something?
Please take a look into this and let me know.
If possible please provide an appropriate solution.
The condition is like this
[code]
if ( oSettings._iDisplayStart >= oSettings.aiDisplay.length ) {
oSettings._iDisplayStart -= oSettings._iDisplayLength;
if ( oSettings._iDisplayStart < 0 ) {
oSettings._iDisplayStart = 0;
}
}
[/code]
I am facing problem when I am in (say) 3rd page and trying to delete a row. My oSettings._iDisplayStart is 200 and oSettings.aiDisplay.length is 96(as I am trying to delete 96th row of 3rd page). In this condition, it is reducing the oSettings._iDisplayStart by 100(oSettings.aiDisplay.length) which is not required as this is not an overflow condition.
A possible overflow condition could be
[code]
if ( oSettings._iDisplayStart + 1 == oSettings._iRecordsTotal )
[/code]
Am I missing out on something?
Please take a look into this and let me know.
If possible please provide an appropriate solution.
This discussion has been closed.