-
-
Notifications
You must be signed in to change notification settings - Fork 425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataTables 2.* Adding custom complex elements to header. #287
Comments
Hi, There are two options:
|
It looks like that removes the ordering controls, but the th tag contents are still replaced: Here's a fiddle with an example: https://jsfiddle.net/1y27gLfo/ |
Hmmm - yes. The title will be written to all cells. Interesting one - thanks for letting me know about that. I'll look into what I can do about that. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We are upgrading to DataTables version 2.
In our implementation we are building a row of filters in the header like this:
In DT 1.* we were able to do this by building the table in html and then binding DataTables to it. Here's a simplified example.
In some cases, the elements within that second row of the header are significantly more complex and it would be painful to build them in JavaScript and append them to the header.
In DT 1.* it seems that the automatic header row with the titles and such were only bound to the first header row.
In DT 2 those get bound to any number of rows so both of my header rows end up the same, replacing the custom inputs:
I have looked through the docs, forums, and even the source code and I don't see any way to tell DataTables to only bind the first row of the header.
Is there some way to tell it to only bind to the first row, or to ignore the second row?
If such a thing does not exist would you consider allowing us to add a class to the second header row that then is checked for in the JavaScript and skips overriding that row with the column headers?
The text was updated successfully, but these errors were encountered: