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
![luisantruiz](https://secure.gravatar.com/avatar/1a89435582ccb9b9a39a67be2806aeee/?default=https%3A%2F%2Fvanillicon.com%2F1a89435582ccb9b9a39a67be2806aeee_200.png&rating=g&size=120)
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]
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]
This discussion has been closed.
Replies
Allan