AutoFill - CallBack and Columns enabled

AutoFill - CallBack and Columns enabled

lb.nicolb.nico Posts: 2Questions: 0Answers: 0
edited September 2010 in General
Hi Allan,

First of all, thank very much you for the update of AutoFill Plugin with callback functions ! it's very cool !

But, I have a little problem when i want use columns enablement and callback functions.
When i use "bEnable": false, "aTargets": [ -3,-4,-5 ] for example, my callback function seems to be disable...

Here is my code :

[code]
new AutoFill( oTable, {
"aoColumnDefs": [ {
"bEnable": false,
"fnCallback": function ( ao ) {
var n = document.getElementById('output');
for ( var i=0, iLen=ao.length ; i

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Nico,

    The callback function you've defined is applied to only the columns that you've marked as disabled - so you shouldn't get any option to use AutoFill on these columns, and therefore no way to trigger the callbacks!

    What you perhaps could do is to make use of the _all target type (assuming it's what you want) to apply the callback to all columns, and then a different column definition to disable the three columns you want to:

    [code]
    new AutoFill( oTable, {
    "aoColumnDefs": [ {
    "fnCallback": function ( ao ) {
    var n = document.getElementById('output');
    for ( var i=0, iLen=ao.length ; i
This discussion has been closed.