Code Monkey home page Code Monkey logo

Comments (3)

Holt59 avatar Holt59 commented on August 19, 2024

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.

etombaugh avatar etombaugh commented on August 19, 2024

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.

Holt59 avatar Holt59 commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.