Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Swapnil Deshmukh on Apr 10, 2009 02:16
open dhtmlx forum
Gride Add/Update Value Issue

Dear Sir,

I am using dhtmlxGride, where I have problem in insert and update values, only in the first row. Whenever I am adding the values in the cells in the first row its not updating in the database and not showing any error, and parameter values in the Dataprocessor Debug console but whenever I am updating the rows below its it working fine, showing text in bold format and getting updated properly.

Please find the below code which I used to get grid, and do needful

I want to add/update the values only in the column index (9 & 10) . While populating the grid I am hiding the some columns 5,6,7,12,13

function getProcessData(){
                //processGrid = new dhtmlXGridObject('circuitgrid');
                //TabbedPanels1.showPanel(4);
                circuitGrid = dhxLayout.cells("b").attachGrid();
                circuitGrid.setImagePath("dhtmlx/dhtmlxTreeGride/codebase/imgs/icons_books/");
                circuitGrid.setHeader("Parts,Contributor,Nominal/Tolerance,Sens,%Cont,CCSL,CCSU,# of Stacks, Set Name,Process Mean, Process Sigma, Edit, SET ID,PD ID");                 circuitGrid.setInitWidths("225,*,120,60,60,60,60,60,145,60,60,60,60,60");
                circuitGrid.setColAlign("left,left,center,center,center,center,center,center,left,center,center,center,center,center")
                circuitGrid.enableMultiline(true);
                circuitGrid.setSkin('light');
                circuitGrid.enableEditEvents(false, true, 'disable')
                circuitGrid.setColumnHidden(5,true);
                circuitGrid.setColumnHidden(6,true);
                circuitGrid.setColumnHidden(7,true);
                circuitGrid.setColumnHidden(12,true);
                circuitGrid.setColumnHidden(13,true);
                circuitGrid.init();
                circuitGrid.loadXML("XML/stack_circut.jsp?stack_id=<%=stack_id%>&userName=<%=userName%>&project_id=<%=project_id%>&project=<%=project%>&abb=<%=abb%>");
                
                myDataProcessor = new dataProcessor("XML/updateDataSet.jsp?user=<%=userName%>");
                myDataProcessor.setUpdateMode("cell");
                myDataProcessor.setTransactionMode("GET");
                myDataProcessor.defineAction("error",function(){
                alert("Error While Updateing/Adding Row");
                    myDataProcessor.stopOnError = true;
                })
                myDataProcessor.init(circuitGrid);
                }

            
Answer posted by Support on Apr 10, 2009 04:19
Which ID assigned to first row? 
By any chance is it equal to 0, false, null ? Such IDs can be treated incorrectly by javascript, and must not be used. 
Answer posted by Swapnil Deshmukh on Apr 10, 2009 04:28
The ID of first row is not 0 its a 4 digit unique number.
Answer posted by dhxSupport on Apr 10, 2009 04:51
Please contact support@dhtmlx.com and provide sample where we can reproduce this issue