[newbie] Check All checkboxes fonction - Page 2

[newbie] Check All checkboxes fonction

2»

Replies

  • JoyrexJoyrex Posts: 92Questions: 14Answers: 3
    This thread has been incredibly helpful in solving the issue of checking checkboxes that are not visible on the current page, and the above code works - however, one thing that still remains (and frankly I'm surprised nobody mentioned it here) is those hidden checked checkboxes do not get submitted when using it in a form - any ideas?
  • imhalfpirateimhalfpirate Posts: 9Questions: 0Answers: 0
    @JoyRex

    http://datatables.net/examples/api/form.html

    ^ You can do this.

    I'm doing it a little differently. I have a hidden field, and when I call AJAX submit I run this:

    [code]
    checkedCheckboxes = $("input:checked", yourDataTableVariable.fnGetNodes()).map(function(){
    return this.id
    });
    [/code]

    What I get in return is a long list of the checkbox ID's which I set up as all numerical (392, 952, 935, 953, 293). I then seperate these server side when I insert them in the table. You don't have to do it this way, but I wanted you to see both ways of getting all the hidden checkboxes.
  • SurtidoSurtido Posts: 5Questions: 0Answers: 0
    edited February 2012
    [quote]
    Joyrex January 10
    Posts: 13
    This thread has been incredibly helpful in solving the issue of checking checkboxes that are not visible on the current page, and the above code works - however, one thing that still remains (and frankly I'm surprised nobody mentioned it here) is those hidden checked checkboxes do not get submitted when using it in a form - any ideas?
    [/quote]

    it was mentioned, but nobody asked it. Anybody have a clue?
  • SurtidoSurtido Posts: 5Questions: 0Answers: 0
    hidden checked checkboxes do not get submitted when using it in a form - solution:
    http://datatables.net/examples/api/form.html
  • adromiladromil Posts: 53Questions: 4Answers: 0
    I am using also a checkall event in javascript:
    however it is not working if my entries a more that the paginated items, what I mean is that it is only working in the first page and not on the other pages.

    Can somebody give me inputs here?

    Thank you in advanced
  • yuanyeqishiyuanyeqishi Posts: 2Questions: 0Answers: 0
    thanks for your help, i fixed my issues.
  • robertbrowerrobertbrower Posts: 158Questions: 1Answers: 0
    I have check all and uncheck all buttons in my column header in a column whose cells contains the word "checked" or "unchecked". I use fnRender to render the checkboxes for this column so that I can maintain sortability on the checkboxes in this column. I want to change the underlying data of ~only~ the filtered data to "checked" or "unchecked" when I click on one of these check boxes. I can't find the documentation on the fnGetFilteredData API method.

    How can I get the data so that it is only the filtered data and so I can can fnUpdate on it, then fnDraw once all rows are updated?

    Thanks

    Bob
This discussion has been closed.