Row Details error for dynamic table: a is null, b is null

Row Details error for dynamic table: a is null, b is null

jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
edited June 2011 in Bug reports
Hi,

I am using data tables for a dynamically generated table (via ajax calls). The table by itself works fine (as I am emptying the div which holds the table, between the ajax calls). But when I implemented row details, I started getting error after the first ajax call (the first rendering of the row details works fine). If I click to open the row details, I see this error:

a is null ..... (line 99)

If I close the row details, I see a different error:

b is null..... (line 125)

Is this a bug, or does row details work for dynamic tables.

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Should work just fine, as shown for sever-side processing here: http://datatables.net/release-datatables/examples/server_side/row_details.html . What are the a and b variables? I presume that this is in your custom code?

    Allan
  • jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
    Hi Allan,

    The variables a and b point to jquery.dataTables.min.js code. Here is the line 99 from firebug for "a is null" error:

    c++;if(d==b)return a.aoColumns[d].bVisible===true?c:null}return null}function U(a,b){var c,d;c=a._iDisplayStart;for(d=a._iDisplayEnd;c
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    Could you try it with the unminified version please and let me know where it trips up - it's a bit obscure with the min version :-). Also if you can post a link that would be useful.

    Allan
  • jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
    edited June 2011
    I tried with unminified version. Now I get a different error "s is null" on line 5363:

    [code]for ( i=s._iDisplayStart, iLen=s._iDisplayEnd ; i
  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    The error you are getting usually means that the reference to the DataTable has been lost for some reason. oTable.fnGetData(nTr) will get the data for the row (nTr) from the table oTable. I think we might need to see the code where you are actually using that code to be able to help any. It would be very helpful if you could link to the page you are using.

    Allan
  • jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
    edited July 2011
    Working now after I moved the rowdetails event methods to document.ready().
  • MarquardtMarquardt Posts: 1Questions: 0Answers: 0
    Hello. I have the same problem. Could you explaine me wiche event methods do you moved
  • jQuery_userjQuery_user Posts: 27Questions: 0Answers: 0
    I was busy and couldn't come back to forums...

    I moved the rowdetails event method "function fnFormatDetails ( oTable, nTr )" to document.ready()
This discussion has been closed.