Problem when using with C# web application
Problem when using with C# web application
gormar
Posts: 5Questions: 0Answers: 0
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
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
This discussion has been closed.
Replies
Thanks,
Allan
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
Thanks,
Allan
Allan
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
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.