serializeToCSV() with header

I am trying to export the content of the grid along with the header to csv. So far I’ve tried the following code but it adds an extra empty row after the header row

oGrid.enableCSVHeader(true);
var csv=oGrid.serializeToCSV();

what am I doing wrong here? I am using v.3.0 build 110713

Unfortunately the issue cannot be reproduced.
The following code works well for us.
If issue still occurs - please, provide a sample of your code with the init of your grid.

So here is my code to initialize the grid

oGrid = new dhtmlXGridObject(‘gridbox’);
oGrid = setColumnValues(oGrid,jsonMetaData);
oGrid.setImagePath(“view/images/icons/”);//path to images required by grid
oGrid.enableColumnMove(true);
oGrid.enableAutoWidth(false); // if ‘true’ resizes grid to the size of individual columns
if ($.cookie(“locale”)) {
oGrid.setDateFormat($.cookie(“locale”));
}

oGrid.setEditable(false)
oGrid.enableMultiselect(true);
oGrid.init();//initialize grid
oGrid.setSkin(“dhx_web”);//set grid skin
oGrid.enableHeaderMenu();

oGrid.enableDistributedParsing(true,20,250);

oGrid.parse(jsonData,function() {

oGrid.loadOrderFromCookie();
oGrid.loadSortingFromCookie();
oGrid.loadSizeFromCookie();
oGrid.enableAutoSizeSaving();
oGrid.enableSortingSaving();
oGrid.enableOrderSaving();
oGrid.enableAutoHiddenColumnsSaving();

}, “jsarray”);

And this is the export to csv function
function attachExportListeners(){

$("#export_grid").click(function (e) {
    oGrid.enableCSVHeader(true);
    var w = window.open();
    var csv=oGrid.serializeToCSV();
    $(w.document.body).html("<pre>"+csv+"</pre>");

});

Please, provide the complete demo with defined header and data loaded to the grid.
Here is the tutorial:
docs.dhtmlx.com/doku.php?id=othe … leted_demo