how to change form option for all rows
how to change form option for all rows

I have a table where one of the columns has an html form with two options; front.jpg and back.jpg. I'm trying to make it so If I choose one of these options in the column header, that it changes every value of the table's rows.
https://jsfiddle.net/martinradio/L2ypkauc/16/
I created my table, and added an event listener that works. I tried getting each row with upload_table.rows().eq(0).each( function ( index ) { which works, but I cant change the values of any rows.
If I choose 'front.jpg' in my column header, how can I set every row's column value to be 'front.jpg' too?
This question has an accepted answers - jump to answer
Answers
Use
row.data( data );
to set the data. I also commented out thedisplay: none;
for the column you are changing so the change can be seen. Here is the updated test case:https://jsfiddle.net/woah79n1/
Kevin
thank you!