Updating an entire column with a new value

Updating an entire column with a new value

redsunsetredsunset Posts: 44Questions: 15Answers: 0
edited April 2019 in Free community support

I have a column value that has a standard value of 1 ... If I hit a button, a text field is increased by one. Every time I hit that button the entire column should be updated with the new value too.

I just gave the column a class called "quantity" and I just tried to do something like this via jquery:

    var newvalue = $(".resultm").html();
       $(".quantity").html(newvalue);

but that would only update all entries on page 1 ... I have more than 5000 pages in my dataTable that should be updated ... How could I do this?

thanks in advance for any help and best greetings
RedSunset

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586
    Answer ✓

    Hi @redsunset ,

    To give this some background, could you explain why you want a column to have a single value? At a glance, it seems worthless if it is always the same.

    But, given that, if it is always the same, you could just add that value in for each draw - it could display a variable on each draw, rather than update each row on each change.

    Cheers,

    Colin

  • redsunsetredsunset Posts: 44Questions: 15Answers: 0

    you were right! I just did some design changes and it worked well.

This discussion has been closed.