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

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

luisantruizluisantruiz Posts: 1Questions: 0Answers: 0
edited May 2012 in General
In any PostBack of the UpdatePanel occurs this error:

The error appears in jquery.dataTables.js:
"Microsoft JScript runtime error: Unable to get value of the property 'fnSetData': object is null or undefined".
in the function:
[code]
function _fnSetCellData( oSettings, iRow, iCol, val )
{
var oCol = oSettings.aoColumns[iCol];
var oData = oSettings.aoData[iRow]._aData;

oCol.fnSetData( oData, val );
}
[/code]
My Markup:
[code]
























[/code]
I have a Update Panel with many events, and the GridView and the other controls are inside:
[code]








[/code]
then, I have the js function in the pageLoad():
[code]
$("#gvDatos").dataTable({
"bPaginate": true,
"bLengthChange": false,
"bFilter": true,
"bInfo": false,
"bAutoWidth": true,
"oLanguage": {
"sSearch": "Búsqueda:",
"sZeroRecords": "No hay datos para mostrar",
"sEmptyTable": "No hay datos para mostrar",
"oPaginate": {
"sNext": "Siguiente",
"sPrevious": "Anterior",
"sFirst": "Primero",
"sLast": "Último"
}
},
"aoColumnDefs": [
{ "asSorting": ["desc"], "aTargets": [1]}]
});
[/code]
C# server-side:
[code]
gvDatos.DataBind();
gvDatos.Columns[0].Visible = false;
if (gvDatos.Rows.Count > 0)
{
gvDatos.HeaderRow.TableSection = TableRowSection.TableHeader;
gvDatos.FooterRow.TableSection = TableRowSection.TableFooter;
}
[/code]

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Can you link to a page showing the error or run the table through the debugger please?

    Allan
This discussion has been closed.