How do I send an argument to fn.dataTable.ext... functions ?

How do I send an argument to fn.dataTable.ext... functions ?

Mazhar123Mazhar123 Posts: 17Questions: 4Answers: 0

Hi, I am using DataTables and using $.fn.dataTable.ext.search.push utility for range searching. Here is the snippet -

$.fn.dataTable.ext.search.push(
function( settings, data, dataIndex ) {
//Some code
);

Apart from, settings, data and dataIndex, I want to send one of my own variable as an argument anytime I want. How do i do that ?
Can anyone please help ?

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,112Questions: 1Answers: 2,583
    Answer ✓

    Hi @Mazhar123 ,

    That's not possible I'm afraid. One alternative though would be to use a global variable instead.

    Cheers,

    Colin

  • Mazhar123Mazhar123 Posts: 17Questions: 4Answers: 0

    Yes, that's what I was using (Global variable). Thanks @colin

    Regards,
    Mazhar

This discussion has been closed.