dhtmlx grid loading from csv file

Hi,



I am trying to build a dhtmlx grid by loading from a csv file. Im my grid the header is populating from the first row in CSV file

And I am using the following code



mygrid = new dhtmlXGridObject(‘gridbox’);

mygrid.enableCSVHeader();

mygrid.loadCSV(“test1.csv”);



but I am getting a js error-“Object doesn’t support this property or method”


You need to define a width of column in js code


mygrid = new dhtmlXGridObject(‘gridbox’);
mygrid.enableCSVHeader();
mygrid.setInitWidths(“100,100,150,100”);
mygrid.loadCSV(“test1.csv”);

If problem still occurs for you - please try to use attached js file instead of original one.




dhtmlxgrid_nxml.zip (4.37 KB)