Wrong message on server side filtering
Wrong message on server side filtering
Nicu
Posts: 1Questions: 0Answers: 0
I set both sEmptyTable and sZeroRecords.
Then after the server side filtering I always get the sEmptyTable message which is the wrong one.
I think there might be an issue here.
[code]
var sZero = oLang.sZeroRecords;
if ( oSettings.iDraw == 1 && oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
{
sZero = oLang.sLoadingRecords;
}
else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
{
sZero = oLang.sEmptyTable;
}
[/code]
Here is how I fixed it, can you please tell me if it's a good approach?
[code]
var sZero = oLang.sZeroRecords;
if ( oSettings.iDraw == 1 && oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
{
sZero = oLang.sLoadingRecords;
}
else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 && !oSettings.oPreviousSearch.sSearch)
{
sZero = oLang.sEmptyTable;
}
[/code]
Then after the server side filtering I always get the sEmptyTable message which is the wrong one.
I think there might be an issue here.
[code]
var sZero = oLang.sZeroRecords;
if ( oSettings.iDraw == 1 && oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
{
sZero = oLang.sLoadingRecords;
}
else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
{
sZero = oLang.sEmptyTable;
}
[/code]
Here is how I fixed it, can you please tell me if it's a good approach?
[code]
var sZero = oLang.sZeroRecords;
if ( oSettings.iDraw == 1 && oSettings.sAjaxSource !== null && !oSettings.oFeatures.bServerSide )
{
sZero = oLang.sLoadingRecords;
}
else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 && !oSettings.oPreviousSearch.sSearch)
{
sZero = oLang.sEmptyTable;
}
[/code]
This discussion has been closed.