Skip to Content

unchecking the checkbox on click of cancel button

Hi everyone,

I want to uncheck a checkbox which i selected in edit mode.

checkbox values :1 to 4 are coming from the odata and in edit mode i selected checkbox 8.

On clicking cancel button, checkbox 8 should be unchecked and the view get restored to 4 checked boxes.

How do i achieve it?

Please share your ideas.

Thanks,

Saurabh Singh.

checkbox.JPG (29.9 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 02, 2015 at 07:38 AM

    Hi,

    If you're going with jQuery, then apply this code on press cancel


    $('#id of CheckBox').prop('checked', true);
    $('#id of CheckBox').prop('checked', false);

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 02, 2015 at 12:26 PM

    Storing each checkboxes value in a variable is a tiring process and is not feasible for large number of checkboxes. So all i had to do was call the url (odata) to display detail page on cancel button click and it worked. This way its efficient, not much of coding is required , just re-using the existing function.

    Thanks Pradeep and Indrajith for your efforts.

    Add comment
    10|10000 characters needed characters exceeded