Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8539251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:19:11+00:00 2026-06-11T11:19:11+00:00

I am using the jQuery dataTables plugin to build advanced tables for our application.

  • 0

I am using the jQuery dataTables plugin to build advanced tables for our application. One of the requirements is to have “collapsible” rows (not groups!): e.g. rows represent campaigns, and they might have child campaigns. The structure of child rows is (in basic case) the same as in the parent table – same cells, same data types.

But, the child rows shouldn’t affect the parent table itself: I mean, the number of rows per page should remain the same, child rows shouldn’t be sorted separately from the parent row, they should always remain binded. Therefore I can’t use fnAddData() API func for that.

And the other tricky requirement is the possibility to have multi-level collapsible rows (e. g. child campaigns for child campaigns, etc.)

I was using the fnOpen() API function for that, it allows to “open” any row, appends a child block to it, and you can generally insert there whatever you want. It was working just fine in dataTables 1.8.2, i used code like this to generate child rows:

$(childRowData).each(function(){
    row = $(oTable.fnOpen(row.get(0), $(this), "child_row"));
    $(row).addClass('child_row');
});

Generally, it “opened” the current row (defined above), inserted data in the child row, then in the cycle “opened” the child row, added a child to it, etc.

But as of dataTables 1.9.0 looks like it is allowed only to “open” the parent rows, and only do it once.

Of course, I can create a sub-table, apply $.dataTable() to it and insert it to the child row, but it seems like a somewhat lame and expensive solution, especially when we might have 3-4 levels of depth.

Is there any other way to implement collapsible rows in dataTables?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:19:12+00:00Added an answer on June 11, 2026 at 11:19 am

    When you create the child row that has subchildren, you’re probally best off rolling your own solution.. I was doing some stuff similar to this a few weeks ago with datatables and that was the best I could come up with.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have started using the DataTables plugin (v1.6.2) for jQuery (v1.4.2), and I would
I am using the jQuery DataTables plugin in my application and am displaying a
I am using the DataTables plugin for jQuery and need to get one of
I'm using datatables jquery plugin for beautifying my tables. I'm trying to stylize the
I have been using the DataTables plugin for jQuery (http://www.datatables.net) to search, sort and
I am using the JQuery DataTables plugin for displaying large sets of data. One
So I am using the JQuery DataTables plugin, and have configured it to use
I have been looking for some examples and solutions using the jquery-datatables-editable plugin and
I'm using Datatables and have this jquery plugin showing in a few columns http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
I am using the DataTables jQuery plugin. The way I want my tables to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.