exportOptions columns

exportOptions columns

Andreas S.Andreas S. Posts: 207Questions: 73Answers: 4
edited April 2018 in Buttons

I try to set in the exportOption the column Number that are shown by the login level.
I tried it with this code:

                exportOptions: {
                    columns: function( idx, data, node ) { 
                        if( 4 == uLevel ) { 
                            return new Array( 0, 4, 1, 5, 7 );
                        } else {
                            return new Array( 0, );
                        }
                         
                    },

But that did not work. I think that should be the same as columns: [ 0, 1, 2 ]
What is wrong here?

Andreas

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586
    Answer ✓

    Hi @Andreas S. ,

    The function needs to return true or false, depending on whether you want that column in the export. So something like this example.

    Cheers,

    Colin

  • Andreas S.Andreas S. Posts: 207Questions: 73Answers: 4

    Thank, that help me.

This discussion has been closed.