Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Brendan on Oct 21, 2008 07:25
open dhtmlx forum
serializeToCSV(): zx has no properties

I am getting the error "zx has no properties" when trying to serialize the grid to csv. I am currently using the updated dhtmlxGrid_nxml.js file that I found in the Knowledge Base. Also, I am NOT using the new 2.0 version of dhtmlxGrid. Thanks again for your great help!

The code I am using:

function exportToCsv()
{
    mygrid.setCSVDelimiter("\t");//chnage csv delimiter
    var csv = mygrid.serializeToCSV();          
    
    document.getElementById('test').innerHTML = csv; // Just outputting the csv string here to test results
}

Here is the grid initialization in which I am trying to export:

var gridQString = "getGridRecords.php";
var mygrid;        

function doInitGrid()
{
    mygrid = new dhtmlXGridObject('products_grid');            
            
    mygrid.setImagePath("../source/codebase/imgs/");
        
    mygrid.setHeader(",Hospital,Total Purchase");
        
    mygrid.setInitWidths("30,350,985");
        
    mygrid.setColAlign("center,left,right");
        
    mygrid.setSkin("modern");            
    
    mygrid.setColSorting("server,server,server");            
    
    mygrid.setColTypes("sub_row,str,price");            
            
    mygrid.init();
        
    mygrid.enableSmartRendering(true);
        
    mygrid.attachEvent("onBeforeSorting",sortGridOnServer);            
            
    mygrid.attachEvent("onSubGridCreated",doInitRegionalMinstrySubGrid);                        
            
    mygrid.loadXML(gridQString );        
}
Answer posted by Support on Oct 21, 2008 08:05
This is known issue for version  1.6 - please use attached js file instead of original one, it will resolve problem. 
Attachments (1)