Using iDeferCount does not defer initial load
Using iDeferCount does not defer initial load
I am trying to use the iDeferCount with DataTables, but the call to initialize the datatable
is causing an ajax load. I have bServerSide set to false, perhaps that is the issue, but
I am not sure why. My init code is: (coffeescript)
[code]
@init_layer_datatable: (tableId,ajax_src,customSettings) ->
defaultSettings =
iDeferLoading: 50
aoColumns: [null,null,null,null,null,null,null,null]
bSort: false
bPaginate: false
bFilter: false
bAutoWidth: false
bProcessing : true
bServerSide : false
sAjaxSource : ajax_src
oLanguage : {
sZeroRecords : 'No entries exist'
sEmptyTables : 'No entries exist'
}
sDom: "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>"
fnServerData: (sSource, aoData, fnCallback) ->
#All search fields will have a class of search field
if not aoData?
aoData = []
$.ajax(
dataType: 'json'
type: 'GET'
url: sSource
data: aoData
success: (json,status) ->
fnCallback(json)
)
finalSettings = Fei.merge(defaultSettings,customSettings)
$('#' + tableId).dataTable(finalSettings)
[/code]
Any help would be appreciated.
Thanks,
Don Mc
is causing an ajax load. I have bServerSide set to false, perhaps that is the issue, but
I am not sure why. My init code is: (coffeescript)
[code]
@init_layer_datatable: (tableId,ajax_src,customSettings) ->
defaultSettings =
iDeferLoading: 50
aoColumns: [null,null,null,null,null,null,null,null]
bSort: false
bPaginate: false
bFilter: false
bAutoWidth: false
bProcessing : true
bServerSide : false
sAjaxSource : ajax_src
oLanguage : {
sZeroRecords : 'No entries exist'
sEmptyTables : 'No entries exist'
}
sDom: "<'row'<'span6'l><'span6'f>r>t<'row'<'span6'i><'span6'p>>"
fnServerData: (sSource, aoData, fnCallback) ->
#All search fields will have a class of search field
if not aoData?
aoData = []
$.ajax(
dataType: 'json'
type: 'GET'
url: sSource
data: aoData
success: (json,status) ->
fnCallback(json)
)
finalSettings = Fei.merge(defaultSettings,customSettings)
$('#' + tableId).dataTable(finalSettings)
[/code]
Any help would be appreciated.
Thanks,
Don Mc
This discussion has been closed.
Replies
That is what I am using i
Don
Don
Allan