Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ramakrishna on Jul 09, 2008 02:47
open dhtmlx forum
DHTMLX Grid : Not able to save the grid data

hi there,
I am not able to save the Grid data using serialize() and serializeToCSV() functions.
It gives js error "zx has no properties";
Please help !!!
Answer posted by Support on Jul 09, 2008 03:00
Please be sure that you correctly specified column types. Such error can occur if you are used incorrect column type name ( grid still able to load data with incorrect settings, but serialization functionality will be broken )

If problem still occurs for you - please provide any kind of sample where problem can be reconstructed.
Answer posted on Jul 09, 2008 03:42
Hi,
     I have written following code to create grid, Is there any Error in it ????? Please help.
     I need it urgently to save grid data using one of the function : serialize() and serializetoCSV();



// Context Menu Creation : S
                       
                            var aMenu=new dhtmlXContextMenuObject('120',0,Gpath+"/js/dhtmlx/dhtmlxMenu/codebase/imgs/");
                             aMenu.menu.loadXML(Gpath+"/xml/context/classDetails.xml"); // This xml file we use    to show context menu on right click.           
                            aMenu.setContextMenuHandler(onButtonClick);
                            aMenu.setContextZone("treeBox",1);
                       
                        // Context Menu Creation : E
                 
                     
                       
                        if(header=='yes'){
                      
                        var mycars = new Array();
                            mycars[0] = shareclass;
                            mycars[1] = cusip;
                            mycars[2] = classinceptiondate;
                            mycars[3] = classnumber;
                            mycars[4] = status;
                            mygrid.addRow(2,mycars,1);
                            if(status=='Active'){
                            mygrid.getCombo(4).put("1","Active");
                            mygrid.getCombo(4).put("2","Inactive");
                            }else{
                            mygrid.getCombo(4).put("1","Inactive");
                            mygrid.getCombo(4).put("2","Active");
                            }
                        }else{
                       
                        mygrid = new dhtmlXGridObject('mygrid_showclassdetails');
                        mygrid.setImagePath(Gpath+"/js/dhtmlxGrid/codebase/imgs/");
                        mygrid.setHeader("ShareClass,CUSIP,Class Inception Date,Class Number,Status");
                        mygrid.setInitWidthsP("30,10,10,10,40");
                        mygrid.setColAlign("left,left,left,left,left");
                        mygrid.setSkin("light");
                        mygrid.setColTypes("ro,ed,dhxCalendar,ed,co");
                           mygrid.setColSorting("str,str,date,str,str");
                        mygrid.enableTooltips("false,false,false,false,false");   
                        mygrid.enableContextMenu(aMenu); // We have to use this function to enable context menu on right click.
                        mygrid.getCombo(4).put("1","Active");
                        mygrid.getCombo(4).put("2","Inactive");
                        mygrid.init();
                        mygrid.enableRowsHover(true,'grid_hover');
                        mygrid.enableResizing("false,false,false,false,false");
                        mygrid.enableAutoHeight(true, "100%", null);
                        mygrid.enableAutoWidth(true, "100%", "100%");
                        mygrid.loadXML(Gpath+"/fundClassDetails.action?shareclass="+shareclass+"&cusip="+cusip+"&classinceptiondate="+classinceptiondate+"&classnumber="+classnumber+"&status="+status);
Answer posted by Support on Jul 09, 2008 07:46
Please be sure that you have included
    dhtmlxgrid_excell_dhxCalendar.js
in your project, this file is necessary when dhxCalendar column type defined.

When all necessary files included serialization works correctly - please check attached sample.
Attachments (1)