Comments (3)
Could you show me a bit of the table layout? And also the line where the error occurs (if you are not using the minified version)?
You can specify a function in place of a filter, e.g.:
{
filters: [
function(data, text) { // First column
return data == text;
}
]
}
from datatable.
Here is the error I am getting:
Uncaught TypeError: Cannot read property 'innerHTML' of undefined
at new DataTable (datatable.js:135)
at HTMLTableElement.<anonymous> (datatable.jquery.js:42)
at Function.each (jquery.min.js:2)
at w.fn.init.each (jquery.min.js:2)
at w.fn.init.$.fn.datatable (datatable.jquery.js:21)
at HTMLDocument.<anonymous> (view_all_rates:87014)
at l (jquery.min.js:2)
at c (jquery.min.js:2)
Table for example purposes (simplified). First row is the parent row, the second tag is for the hidden detail row.
<tr data-toggle="collapse" data-target="#rate_detail-1" class="accordion-toggle">
<td rowspan="1" colspan="1">Test Data</td>
<td rowspan="1" colspan="1">Test Data</td>
<td rowspan="1" colspan="1">Test Data</td>
</tr>
<div id="rate_detail-1">
<tr class="accordian-body collapse">
<td colspan="10">
<div class="col-md-6">
<div class="box box-danger">
<div class="box-header with-border">
<h4 class="box-title">Rate Details</h4>
</div>
<div class="box-body">
<table class="table table-bordered table-hover">
<tbody>
<tr>
<td>Carrier</td><td>Sample</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</td>
</tr>
</div>
from datatable.
I do not really understand your example... You have two different rows each time? And you have one <tr>
within a <div>
? I am not sure this is valid HTML...
If you really have two different rows, it'll be quite complicated to do what you want... To use datatable at all actually since your two rows will probably get messed up when sorting / etc.
from datatable.
Related Issues (20)
- Inject data to table row HOT 4
- Nullpointer Exception table with filter and no data
- Not working on my project :( HOT 6
- CSS not work HOT 4
- Extract filtered records HOT 11
- Filter outside the table HOT 2
- No idea how to make filter outside table HOT 1
- Get number of a table row. HOT 6
- Update table data HOT 19
- Process Ajax Data Before Displaying on Table! HOT 3
- Question: How to search/filter multiple columns with one search field HOT 2
- Was cleared all attributes from td. HOT 1
- Click in a row event HOT 3
- Filter by date mm/dd/yyyy HOT 1
- Ajax Doesn't Work HOT 4
- filter is not function after apply addRows HOT 2
- Table reload method HOT 2
- how can i implement for rowspan ? HOT 3
- how to set default page ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datatable.