How to pass the array value in to columns attribute of Jquery data table

user3829086

I want to pass the variable to mColumns attributes instead of [0, 1, 2, 3,4,5,6,7,8,9] , Here is my code :

$(function() {
 var table=$('#MSRRes').dataTable
( {

 "oTableTools": 
 {
    "sSwfPath": "swf/copy_csv_xls_pdf.swf",
    "aButtons": [
               {
                   "sExtends": "csv",
                   "mColumns": [0, 1, 2, 3,4,5,6,7,8,9],
                   "sAction":     "flash_save"

             }
    ]
  }
});
});
okisinch

You mean like this?

var someArray=[0, 1, 2, 3,4,5,6,7,8,9];

(function() {

var table=$('#MSRRes').dataTable ( {

 "oTableTools": 
 {
    "sSwfPath": "swf/copy_csv_xls_pdf.swf",
    "aButtons": [
               {
                   "sExtends": "csv",
                   "mColumns": someArray,
                   "sAction":     "flash_save"

             }
    ]
  }
});
});

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

jQuery how to find an element based on a data-attribute value?

From Dev

How do I use the data- attribute to pass values with jQuery?

From Dev

jQuery .on() click event catching dynamic 'data-' attribute in list of buttons to pass value to other function?

From Dev

How to pass a list of columns to data.table where some are predetermined

From Dev

Alert custom attribute value jquery table cell

From Dev

How to get the value of data attribute using jquery

From Dev

how to change an attribute value in jquery

From Dev

List of data- attribute to pass values with jQuery

From Dev

How to get value of data attribute with jquery

From Dev

How to access the value of a data attribute using jQuery

From Dev

Pass an array as attribute-value

From Dev

How to set AJAX response to jquery data table columns?

From Dev

How to get a value of data-attribute with jquery

From Dev

How to get data-id attribute value in Jquery?

From Dev

How to pass multiple parameters in a value attribute and put them in an associative array in the name attribute?

From Dev

How do I use the data- attribute to pass values with jQuery?

From Dev

jQuery .on() click event catching dynamic 'data-' attribute in list of buttons to pass value to other function?

From Dev

How to pass attribute value on double click using jquery

From Dev

how to pass value in jquery function to retrieve the data

From Dev

how to delete array value from table in jquery

From Dev

jquery how to get an attribute from an array and pass it to another array

From Dev

how to pass value attribute in laravel template blading?

From Dev

List of data- attribute to pass values with jQuery

From Dev

pass value to modal popup using jquery by using data-id attribute in anchor tag

From Dev

How to get join table data and pass inside array in php

From Dev

jQuery Get Value of data Attribute

From Dev

how to use javascript to invoke the value of an html special data attribute and pass to php array in yii 1.1.14?

From Dev

How to pass some data in chunks inside html table in jQuery

From Dev

How to create jquery data table from JSON array without declaring columns

Related Related

  1. 1

    jQuery how to find an element based on a data-attribute value?

  2. 2

    How do I use the data- attribute to pass values with jQuery?

  3. 3

    jQuery .on() click event catching dynamic 'data-' attribute in list of buttons to pass value to other function?

  4. 4

    How to pass a list of columns to data.table where some are predetermined

  5. 5

    Alert custom attribute value jquery table cell

  6. 6

    How to get the value of data attribute using jquery

  7. 7

    how to change an attribute value in jquery

  8. 8

    List of data- attribute to pass values with jQuery

  9. 9

    How to get value of data attribute with jquery

  10. 10

    How to access the value of a data attribute using jQuery

  11. 11

    Pass an array as attribute-value

  12. 12

    How to set AJAX response to jquery data table columns?

  13. 13

    How to get a value of data-attribute with jquery

  14. 14

    How to get data-id attribute value in Jquery?

  15. 15

    How to pass multiple parameters in a value attribute and put them in an associative array in the name attribute?

  16. 16

    How do I use the data- attribute to pass values with jQuery?

  17. 17

    jQuery .on() click event catching dynamic 'data-' attribute in list of buttons to pass value to other function?

  18. 18

    How to pass attribute value on double click using jquery

  19. 19

    how to pass value in jquery function to retrieve the data

  20. 20

    how to delete array value from table in jquery

  21. 21

    jquery how to get an attribute from an array and pass it to another array

  22. 22

    how to pass value attribute in laravel template blading?

  23. 23

    List of data- attribute to pass values with jQuery

  24. 24

    pass value to modal popup using jquery by using data-id attribute in anchor tag

  25. 25

    How to get join table data and pass inside array in php

  26. 26

    jQuery Get Value of data Attribute

  27. 27

    how to use javascript to invoke the value of an html special data attribute and pass to php array in yii 1.1.14?

  28. 28

    How to pass some data in chunks inside html table in jQuery

  29. 29

    How to create jquery data table from JSON array without declaring columns

HotTag

Archive