Problem when using with C# web application

Problem when using with C# web application

gormargormar Posts: 5Questions: 0Answers: 0
edited January 2012 in DataTables 1.8
Hello,

I have a small C# web application, that generates an HTML table, that should be made scrollable.
However, when initiating DataTable, I am getting following error

Microsoft JScript runtime error: 'undefined' is null or not an object

on line

oCol.fnSetData( oData, val ); in function below

function _fnSetCellData( oSettings, iRow, iCol, val )
{
var oCol = oSettings.aoColumns[iCol];
var oData = oSettings.aoData[iRow]._aData;

oCol.fnSetData( oData, val );
}

Any idea would be really appreciated.
Just for Your information, the table contains 673 columns and 32 rows, plus 1 row of header. No footer.

Best regards

Marcin

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you link to your page showing the error please? Note that DataTables does not support colspan/rowspan in the TBODY, and there much be one unique cell in the header for each column.

    Thanks,
    Allan
  • gormargormar Posts: 5Questions: 0Answers: 0
    Hello,

    the web page is not available on internet, at least not yet. I can send You the page by email if You provide me with one I could use for that purpose.
    There are no colspans/rowspans in the table body, and I have also (temporarily) removed additional rows from table hearder, where colspans where present.
    I haven't quite understood Your comment about unique cells ... but if You meant that each cell in the header should have a unique text ... that could be the problem, as currently the do not have unique content - in fact - there is intended repetition ...

    I will be happy to provide You with the HTML code generated by the C# code, which I also tried as a standalone HTML document, with the error appearing in the same place.

    Thank You for Your response,
    Marcin
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Can you use the contact form at http://datatables.net/contact to send me the URL please?

    Thanks,
    Allan
  • gormargormar Posts: 5Questions: 0Answers: 0
    Since the page is not published yet (and it's not decided whether it will ever be) - can I send You the HTML file instead ?
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Sure. My e-mail address is at the top of the unminified DataTables JS file.

    Allan
  • gormargormar Posts: 5Questions: 0Answers: 0
    I have just sent You an email :-). Thanks a lot for Your advice and help.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Thanks for the HTML - very useful to see what the problem is.

    As I mentioned before:

    > there much be one unique cell in the header for each column

    At the moment your table does not have one unique cell for each column (the majority of columns are grouped into four). So that is what the problem is, DataTables doesn't support that setup at this time.

    Allan
  • gormargormar Posts: 5Questions: 0Answers: 0
    edited January 2012
    Allan,

    update - ENLIGHTENMENT. I understand what You have on Your mind, and I have completely forgotten about that grouping, probably because You mentioned only TBODY, not the header ...
    Sorry for bothering You, now I get it :-)



    when i remove top two rows from header, exactly the same thing happens. I have tested many possibilties, including unique IDs, header. no header etc

    Please comment out/remove two top header lines and the result will be the same.
This discussion has been closed.