Update column data on cell change.

Update column data on cell change.

maruthikumar80maruthikumar80 Posts: 5Questions: 2Answers: 0

Hello All,
I want to update the column data on value change. For example in the attached image if I update first column to Yes, I want to set other column value to No which is Yes. Because in my functionality at any point I can have only one column value as Yes.
Can you please guide me how can I achieve this.
Note: I am using inline line editor to update the values.

Regards,
Maruthi Kumar

Replies

  • rf1234rf1234 Posts: 2,982Questions: 87Answers: 421

    https://editor.datatables.net/reference/api/dependent()

    Here is an example from my own coding:

    myEditor
            .dependent('infoma.automatic', function (val, data, callback) {
                if (val == '1') {
                    myEditor
                        .show(['infoma.calendar', 'infoma.in_advance',
                               'infoma.holiday_calendar']);
                } else {
                    myEditor
                        .set({'infoma.calendar': '', 'infoma.in_advance': 0,
                              'infoma.holiday_calendar': ''})
                        .hide(['infoma.calendar', 'infoma.in_advance',
                               'infoma.holiday_calendar']);
                }
            })
    
This discussion has been closed.