Columns are shifted one row to the left

I am having some difficulty with using cntr on DHTMLX grid and data processor. I have all my data coming in from a mySQL DB and loading just fine. The problem is that I added the cntr row at the beginning and now everything is off by one column and the last column is blank.



I assume that this has to do with the mygrid.setColumnIds line…but not sure.



Here is what I have:



html>

    

        Save Data dynamicaly    

    



    

        

        

        

        

        

        

        

                

        

        

        

        

        

        

        

        

        



            

                

            

            

                

            

            

                

            

        


                    


                


                    * - fields which shouldn’t have empty value marked with red border.

                


                    
 


                    Add row


                    Remove Selected Row

                    



                     Enable Auto Update    

                    


                    Cell based


                    Row based

                    


                    

                


    

        


        

            //init grid and set its parameters (this part as always)

            mygrid = new dhtmlXGridObject(‘gridbox’);

            mygrid.setImagePath("…/…/includes/dhtmlx/Grid/codebase/imgs/");

            var flds = " ,Store,Name,District,Territory,Address,City,State,Zip Code,Longitude,Latitude,Retailer,Create Date,Modify Date";

                mygrid.setHeader(flds);

                mygrid.setInitWidths(“40,60,100,70,70,*,125,60,70,80,80,100,100,100”)

                mygrid.setColAlign(“center,center,left,center,center,left,left,center,right,right,right,center,center,center”)

                mygrid.setColTypes(“cntr,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,ed,calendar,calendar”);

                mygrid.setColumnIds("$nbsp;,store,name,district,territory,address,city,state,zip,lng,lat,type,create,modify")

                mygrid.setSkin(“modern”);

                mygrid.setColSorting(“na,str,str,str,str,str,str,str,str,str,str,str,date,date”)

                mygrid.init();



        //============================================================================================

            mygrid.loadXML(“php/get.php”);

            myDataProcessor = new dataProcessor(“php/update.php”);

            //myDataProcessor.enableDebug(true);

            myDataProcessor.enableDataNames(true);

            myDataProcessor.setVerificator(1)

            myDataProcessor.setVerificator(3,checkIfNotZero)

            myDataProcessor.setUpdateMode(“off”);//available values: cell (default), row, off

            myDataProcessor.defineAction(“error”,myErrorHandler);

            myDataProcessor.setTransactionMode(“GET”);

            myDataProcessor.init(mygrid);

Please don’t use special characters in the ids of columns
    mygrid.setColumnIds("$nbsp;,store
because they will be used for request constructing , and special chars may harm it.

Please beware that while cntr column doesn’t require any data from xml, it still takes one column, so if you have

    cntr,ro,ro,ro
and in XML
    a1a2a3

it will render as
    1,a2,a3

the data from first column will be missed, you need to add empty cell tag in xml for cntr column