Problem in reading CSV file

Hi

I am getting a problem in reading CSV string separated by semicolon as delimiter (;). Lets take an example let say my string is “Test1;Test2;Test3”

        var mygrid = new dhtmlXGridObject('mygrid_container');
        mygrid.setImagePath("codebase/imgs/");
        mygrid.setHeader("col1,col2,col3");
        mygrid.setInitWidths("100,100,100");
        mygrid.setColAlign("left,right,right");
        mygrid.setSkin("light");
        mygrid.init();
        mygrid.csv.row = "\n";
        mygrid.csv.cell = ";";
        mygrid.parse("test1;test2;test3", "csv");

now when i run this code it skip the first test1 (or first column) for me it very strange. however if i make my string like “;test1;test2;test3” then it works. Do i need to have delimiter at the satrt of everyline as well?. is anyone of you is getting the same problem when reading from CSV string.

try to enable autoID method:

 mygrid.enableCSVAutoID(true);

http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:api_method_dhtmlxgridobject_enablecsvautoid