('#table tr').each(function(index, value)

('#table tr').each(function(index, value)

pearly_030pearly_030 Posts: 42Questions: 0Answers: 0
edited December 2011 in General
Hello,

In my script, i read each table'row like it :
[code]
var oTable1 = $("#reservees").dataTable({
......
"aoColumns": [
{ "bSortable": false, "bSearchable": false, "sWidth": '35px', "bVisible": false },
{ "bSortable": false, "bSearchable": false, "bVisible": false },
{ "bSortable": true, "bSearchable": true, "sWidth": '150px' },
{ "bSortable": true, "bSearchable": true, "sWidth": '150px' },
.....
}
$('#reservees tr').each(function(index, value) {
.....
}
[/code]
I can't read invisible columns like first and second column.
What is the solution to read invisible columns ?

Thanks

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    The fnGetNodes API method. It will return an array of all TR elements in the table.

    Allan
  • pearly_030pearly_030 Posts: 42Questions: 0Answers: 0
    Allan,

    Thanks for your response.
    fnGetData() method works too.

    Finally i used
    [code]
    oTable1.fnSetColumnVis( 0, true );
    .....
    oTable1.fnSetColumnVis( 0, false);
    [/code]
    and it's OK.

    Many thanks.
This discussion has been closed.