0

I use a jquery datatable that contains 6 column this table have to be changed based ob user interactive in the following steps :

1. Click start button will highlight the first row background (i.e gray color). (done!)

2. Change first customer status from (waiting) to (in service). (need help)

3. After finish of serving the customer the user will click on next something will happen

a-) delete the selected row which it will be always row(0).

b-) customer #2 will be selected (highlight) and its status change from (waiting) to (in service).

My important request is once I clicked on Start how can I change the status from (waiting) to (in service)?

$(document).ready(function() {
    $('#culist').DataTable({
    "searching": false,
    "lengthChange": false,
    });
});

$("#straps").on('click', function(event) {
   var table = $('#culist').DataTable();
   table.rows().iterator('row', function(context, index) {

   $(this.row(0).node()).addClass('selectd_Tr');
   });
});

$("#nxtps").on('click', function(event) {
});
$("#psps").on('click', function(event) {
});

Here is my jsfiddle

2
  • What are you stuck with? Commented May 20, 2016 at 12:49
  • You should edit relevant code into the question (but keep the fiddle of course) Commented May 20, 2016 at 13:01

1 Answer 1

1

add this in the click event listener of the start button:

table.cell(0,5).data("In Service");

Here's the fiddle, and here's the cell() function docs

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.