1.6.2 to 1.7.3 - Problems with fnInitComplete

1.6.2 to 1.7.3 - Problems with fnInitComplete

squigsquig Posts: 14Questions: 0Answers: 0
edited October 2010 in General
Hello,

I'm using fnInitComplete to call different functions which add extra buttons to the div "grid_filter" contained in the sDom" div "table-controls":
[code]
var oTable = $('#grid').dataTable({
bJQueryUI: false,
sPaginationType: 'full_numbers',
oLanguage: {
sUrl: 'path/to/language_file'
},
sDom: '<"table-controls"flpir>t',
bAutoWidth: false,
bStateSave: false,
bSortClasses: false,
bProcessing: true,
fnInitComplete: function()
{
func1();
func2();
}
});
[/code]

Using version 1.6.2 this wasn't a problem at all but after upgrading to 1.7.3 no buttons are added. It seems as if the "grid_filter" div doesn't exists when fnInitCallback is called but seems to be created while processing the functions defined in the callback. When I add an while loop which does nothing until "grid_filter" is found my buttons are added but there must be another way to solve this.

[code]
while (!$('#'grid_filter').length) {
// Do nothing
}
[/code]

Any thoughts about this?


With kind regards,

squig
This discussion has been closed.