How to update Multiple rows at once in Ajax using custom button

How to update Multiple rows at once in Ajax using custom button

nanyananya Posts: 6Questions: 1Answers: 0
edited June 28 in Free community support

Hi, I can update each individual row without problem.
Now, I want to update all rows visible after filtering at once.

Example this picture.

I want to assign the same value to "Position" column where st_id (not shown to viewer) are the ones corresponding to shown rows (either 10 or 11 - whichever is easier to achieve).

Currently my script for updating individual row is:

function editData(user_data){
  $('.frm-status').html('');
  $('#userModalLabel').html('Edit Data #'+user_data.st_id>);

  $('#recordID').val(user_data.st_id>);

<?php foreach ($modal as $key => $value) {
    echo "$('#".$key."').val(user_data.".$value.");";
  } ?>

  $('#userDataModal').modal('show');
} 

Can someone please help to modify this script to achieve my goal?
Thank you so much.

Answers

Sign In or Register to comment.