Keeping Yes/No Buttons in a single Column of DataTable ?Very Complex question

Keeping Yes/No Buttons in a single Column of DataTable ?Very Complex question

sunildonsunildon Posts: 40Questions: 7Answers: 0

Hi Alan

I am not sure this can be done or not . But this i what i am looking for sometime

STEP 1:
I need a yes/no button sort of thing with text . (Example : Are you sure , want to delete ? YES/NO )-->Here yes & no will be like buttons not text inside specific column .
STEP 2:
When i click on YES Button it should go to controller and there i will return some text which should be replaced in the coulmn which currently having text with yes/no buttons .
STEP 3:
Likely i need to have such functionality only in some columns not everywhere in datatables .

Any ideas ? Alan this looks very challenging

Regards

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Answer ✓

    Sounds perfectly possible. Create the buttons using columns.render or columns.defaultContent and then simply have a click handler on them that will make your Ajax request and use cell().data() to update with the response.

    Allan

  • sunildonsunildon Posts: 40Questions: 7Answers: 0

    yes it is possible & i partial attempted using fnreder with if condition f. I hope it works further and will look into your advice deeply allan .

    Cheers
    Have a great day

This discussion has been closed.