Update entire colum in datatable jquery -
i using jquery datatable plugin , want update entire column values on click of button. how do that.
i tried using fnupdate here need specify row , column.
this html code table
<table id="regions" class="display" cellspacing="0" width="50%"> <thead> <tr> <th>region</th> <th>min score</th> // want min max col editable <th>max score</th> //min < max </tr> </thead> <tbody> <% scores_row in scores_regions %> <tr> <td><%= label_tag 'regions[]',scores_row.at(0) %></td> <td>1</td> <td>1000</td> </tr> <% end %> </tbody> </table>
this jquery code ,which applies second row third column..i want rows third column..
$('#button_max_apply').click(function(){ otable.fnupdate("text apply",1,2); });
thanks
you can
mytable.column(2).nodes().each(function(node, index, dt){ mytable.cell(node).data('40'); });
- mytable.column(2).nodes() list of nodes of particular column.
- mytable.cell(node) particular cell provided node dom element.
Comments
Post a Comment