Individual column searching

Individual column searching

datahandlerdatahandler Posts: 15Questions: 2Answers: 1
edited June 16 in Free community support

Hello, I've created a plug in which wraps the individual column searching features described here and here.

The plug in allows the search inputs to placed in a second header row, which works perfectly unless scrollY is enabled. With the scrollY value set, the search header row is contained within the scroll body, instead of maintaining its position with the sort header row.

Example: http://live.datatables.net/pakocefu/1/edit?html,js,output

Is this a bug or am I doing something wrong?

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 42,648Questions: 1Answers: 5,493 Site admin
    Answer ✓

    Looks great - thanks for sharing the code with us.

    To get the thead element for the table regardless of scrolling us table().header().

    The reason for that is that the table is split into its component parts when scrolling is enabled to allow the body to scroll independently of the header and footer.

    Allan

  • datahandlerdatahandler Posts: 15Questions: 2Answers: 1

    That works Thank you , Allan.

  • datahandlerdatahandler Posts: 15Questions: 2Answers: 1
    edited June 19

    Could you offer a suggestion for the best way to update each select when the table data changes? i.e. after rows added / removed. I was thinking draw event, but this could be fired for reasons other than data changing? Thanks

  • allanallan Posts: 42,648Questions: 1Answers: 5,493 Site admin
    Answer ✓

    I wrote an example of that a while back, which is available here: http://live.datatables.net/gejojiqu/1/edit .

    Allan

  • datahandlerdatahandler Posts: 15Questions: 2Answers: 1

    Thanks so much. Works perfectly!

Sign In or Register to comment.