checkbox issue with Fixed header

checkbox issue with Fixed header

vinaysowdrivinaysowdri Posts: 7Questions: 2Answers: 0

I am using datatable with fixed header. I have a checbox in the header and also in every row to select rows. If the user checks the header checkbox all the checkbox in the rows get selected. If one of the checbox from the row is selected, the header checbox does notify about it.

The issue is if i scroll down and select any one of the last row, the header checkbox doesnt notify about it, i think its because of the cloned header.

Please let me know if theres a solution to this.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @vinaysowdri ,

    This problem is very specific to your setup, without seeing it, we're shooting fish in a barrel. Please could you provide a live example so that we can help diagnose.

    Cheers,

    Colin

  • vinaysowdrivinaysowdri Posts: 7Questions: 2Answers: 0

    @colin PFA html file .

    1. Increase the no of record to 50.
    2. select any of the checkbox of a row , u can see that header checkbox changes. Now uncheck the checked box
    3. scroll to the last record i.e 50 record of a page, now select the checkbox, the header checkbox no more gets selected.
  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @vinaysowdri ,

    Personally, I would recommend using the jQuery DataTables Checkboxes extension from @gyrocode . This is doing exactly what you're trying to achieve - and is tried and tested!

    If that's not an option, reply back and we can look at your code some more.

    Cheers,

    Colin

  • vinaysowdrivinaysowdri Posts: 7Questions: 2Answers: 0

    @colin, Thanks :smile: will Let u know if this does the job.

  • vinaysowdrivinaysowdri Posts: 7Questions: 2Answers: 0

    @colin: the problem is the checkbox appears in header. Iwant it to appear where my filters are showing up. Let me know if there is any other way to do this

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Weren't your filters in the header though?

  • mikeD123mikeD123 Posts: 12Questions: 6Answers: 0

    i am using jQuery DataTables Checkboxes extension from @gyrocode and fixed header is having problem. when it scrolls it clones the header but if it's in between check all does not work. when it's at the top or bottom of page it works.

  • gyrocodegyrocode Posts: 126Questions: 6Answers: 30

    @mikeD123 jQuery DataTables Checkboxes plugin is compatible with FixedHeader extention, please see this example.

This discussion has been closed.