ERROR: fnSetData is null/undefined

ERROR: fnSetData is null/undefined

jpesquibeljpesquibel Posts: 5Questions: 0Answers: 0
edited September 2011 in General
I keep getting this error. Could somebody please point me in the right direction?

Error: Unable to get value of the property 'fnSetData': object is null or undefined

Here's my references:






Here's my js:

$(document).ready(function() {
$('#tblActivities').dataTable({ "oLanguage": { "sSearch": "Search:" },
"iDisplayLength": 10,
"aaSorting": [[0, "asc"]]});
});

Here's my code-behind: (basically, binding a dataTable to a repeater)

rptrActivities.DataSource = d.Activities_Select(50);
rptrActivities.DataBind();

Here's the markup:






ID
Group
Name
Description
Date & Time
Last Changed






<%#DataBinder.Eval(Container.DataItem, "ActivityID")%>
<%#DataBinder.Eval(Container.DataItem, "ActivityType")%>
<%#DataBinder.Eval(Container.DataItem, "ShortName")%>
<%#DataBinder.Eval(Container.DataItem, "Descr")%>
<%#DataBinder.Eval(Container.DataItem, "ActDateTime")%>
<%#DataBinder.Eval(Container.DataItem, "ModDate")%>










Thanks in advance!

Replies

  • jpesquibeljpesquibel Posts: 5Questions: 0Answers: 0
    It's official. I'm an R-TARD. I forgot the last two table header columns at the top.




    hope this helps another R-TARD like myself.
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    I think I'll introduce a bit of code which will detect that error and flag a warning when it occurs. Its easy done - I've done it enough times myself...

    Allan
  • RedClawsRedClaws Posts: 1Questions: 0Answers: 0
    Hi jpesquibel, your problem is that u have 6 columns to populate in head

    1 - ID
    2 - Group
    3 - Name
    4 - Description
    5 - Date & Time
    6 - Last Changed
    but have 8 columns to populate in body

    1 - <%#DataBinder.Eval(Container.DataItem, "ActivityID")%>
    2 - <%#DataBinder.Eval(Container.DataItem, "ActivityType")%>
    3 - <%#DataBinder.Eval(Container.DataItem, "ShortName")%>
    4 - <%#DataBinder.Eval(Container.DataItem, "Descr")%>
    5 - <%#DataBinder.Eval(Container.DataItem, "ActDateTime")%>
    6 - <%#DataBinder.Eval(Container.DataItem, "ModDate")%>
    7 -
    8 -

    You can create the others 2 columns in head or delete 2 columns in body
  • w9r1w9r1 Posts: 3Questions: 0Answers: 0
    edited May 2012
    I'm getting the same thing. What if you have a table that needs to have a header that spans several columns. There is a sub-header with a th for every column. In that case we use colspan in the first header's th definitions, but there would not be th's for every cell.




    Head1 
    Head2 
    Head3 
    Head4 
    Head5 
    Head6 
    Head7 


    Col1 
    Col2 
    Col3 
    Col4 
    Col5 
    Col6 
    Col7 
    Col8 
    Col9 
    Col10 
    Col11 
    Col12 
    Col13 
    Col14 
    Col15 
    Col16 
    Col17 
    Col18 
    Col19 
    Col20 
    Col21 
    Col22 
    Col23 
    Col24 
    Col25 
    Col26 
    Col27 
    Col28 
    Col29 
    Col30 
    Col31 
    Col32 
    Col33 
    Col34 
    Col35 
    Col36 
    Col37 
    Col38 
    Col39 
    Col40 
    Col41 
    Col42 
    Col43 


    ...
This discussion has been closed.