FixedHeader with gridview problem

FixedHeader with gridview problem

ter9ngter9ng Posts: 3Questions: 0Answers: 0
edited July 2012 in General
hi, I have set up datatables to work with an asp gridview, and everything is working fine. But when I try to add the fixedheader plugin I get an error:
http://i45.tinypic.com/2ntgxok.png

and my table looks like this:
http://i49.tinypic.com/33js468.png


here is my code:
[code]
var oTable = $(".jTable").dataTable({
//#1 Searchfields top and bottom
//"sDom": '<"top"iflp<"clear">>rt<"bottom"iflp<"clear">>',
"iDisplayLength": -1,
//#2 Show x rows per page
"aLengthMenu": [[50, 100, -1], [50, 100, "Alle"]],

//#3 Show/hide columns

"sDom": 'C<"clear">lfrtip',
"oColVis": {
"buttonText": "Change columns"
},
//#5 Themes
/*"bJQueryUI": true,
"sPaginationType": 'full_numbers'*/

"fnFooterCallback": function (nRow, aasData, iStart, iEnd, aiDisplay) {
$($(nRow).children()).remove();
for (var i = 0; i < aasData[0].length; i++) {
var a = document.createElement('th');
$(a).html('');
$(nRow).append(a);
}

var columnas = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28];
for (var j in columnas) {
var columnaActual = columnas[j];

var total = 0;
for (var i = iStart; i < iEnd; i++) {
total = total + parseInt(aasData[aiDisplay[i]][columnaActual]);

}
if (isNaN(total)) {
total = "";
}
$($(nRow).children().get(columnaActual)).html(addCommas(total));
}
},

"aoColumnDefs": [{ "aTargets": ["Lisens", "Lisens 3.Part", "Vedlikehold", "Support", "Konsulent", "Installasjon", "Opplæring", "AMS", "Total", "Veiet Lisens", "Veiet Lisens 3P", "Veiet Vedlikehold", "Veiet Support", "Veiet Konsulent", "Veiet AMS", "Veiet Total"], "bUseRendered": false, "fnRender": function (o) { return o.oSettings.fnFormatNumber(parseFloat(o.aData[o.iDataColumn])); } }]

});
new FixedHeader(oTable);
[/code]

Replies

  • ter9ngter9ng Posts: 3Questions: 0Answers: 0
    this is how it looks without "new FixedHeader(oTable);" :

    http://i49.tinypic.com/1611b0m.png
This discussion has been closed.