Creating parent row children on DataTable initializion

Creating parent row children on DataTable initializion

RedHeronRedHeron Posts: 1Questions: 1Answers: 0
edited July 2014 in Free community support

Hi Guys,

I have been using DataTables for the past few weeks and I totally love it. That said I have had my fair share of ups and downs but always been able to solve the issues. Sadly, this is not the case anymore and I was hoping to get some help from fellow users.

Question 1: I have searched high and low on the forums/web for a way to create a child row once a DataTable is initialized and not when it a <tr> is clicked. Is it possible?

Question 2: I have data inside a child row that needs to get validated server side and then have errors display in the child row. I am ajaxing away so there is no page reload but what I have decided to do is destroy the original datatable and re-initialize it so that the data coming from the server is up to date. Problem is that I have no way to specifically target a parent row thats child row needs to be expanded so that the user can see the error. The problem is not "How do I find the parent row" as that is easy. My problem is if I can get the child row to get drawn on DataTable initialization then all I need is to expand a specific child row but row().child.show() does not work and row().child.open() does not work. I am certain its something silly that I am missing but my fear is that with jQuery DataTables it is not possible to show the child row without passing the data needed for said row. Is this the case?

Any help or links would be greatly appreciated!

EDIT: Updated Post Title

This discussion has been closed.