Categories | Question details Back To List | ||
No update in dhtmlGrid with dhtmlxConnector Hi all, in this case my scripts don't update by using dhtmlxConnector_php. When I send update, I read an alert with xml code: <?xml version='1.0' encoding='UTF-8' ?><rows total_count='47' pos='0' ><row id='1'><cell><![CDATA[1]]></cell><cell><![CDATA[G]]></cell></row><row id='2'><cell><![CDATA[2]]></cell><cell><![CDATA[F]]></cell></row><row id='3'><cell><![CDATA[3]]></cell><cell><![CDATA[SCD]]></cell></row><row id='4'><cell><![CDATA[4]]></cell><cell><![CDATA[LA]]></cell></row><row id='5'><cell><![CDATA[5]]></cell><cell><![CDATA[AD]]></cell></row><row id='6'><cell><![CDATA[6]]></cell><cell><![CDATA[CdL]]></cell></row><row id='7'><cell><![CDATA[7]]></cell><cell><![CDATA[SL]]></cell></row><row id='8'><cell><![CDATA[8]]></cell><cell><![CDATA[SLL]]></cell></row><row id='9'><cell><![CDATA[9]]></cell><cell><![CDATA[SLU]]></cell></row><row id='10'><cell><![CDATA[10]]></cell><cell><![CDATA[A]]></cell></row><row id='11'><cell><![CDATA[11]]></cell><cell><![CDATA[IP15]]></cell></row><row id='12'><cell><![CDATA[12]]></cell><cell><![CDATA[IP8]]></cell></row><row id='13'><cell><![CDATA[13]]></cell><cell><![CDATA[CE]]></cell></row><row id='15'><cell><![CDATA[15]]></cell><cell><![CDATA[PPC]]></cell></row><row id='16'><cell><![CDATA[16]]></cell><cell><![CDATA[ST]]></cell></row><row id='17'><cell><![CDATA[17]]></cell><cell><![CDATA[LV 3]]></cell></row><row id='18'><cell><![CDATA[18]]></cell><cell><![CDATA[24]]></cell></row><row id='19'><cell><![CDATA[19]]></cell><cell><![CDATA[UPG GOLD]]></cell></row><row id='20'><cell><![CDATA[20]]></cell><cell><![CDATA[UPG FULL]]></cell></row><row id='21'><cell><![CDATA[21]]></cell><cell><![CDATA[GV]]></cell></row><row id='22'><cell><![CDATA[22]]></cell><cell><![CDATA[GD]]></cell></row><row id='23'><cell><![CDATA[23]]></cell><cell><![CDATA[CD]]></cell></row><row id='31'><cell><![CDATA[31]]></cell><cell><![CDATA[LVAA]]></cell></row><row id='25'><cell><![CDATA[25]]></cell><cell><![CDATA[Chiave Usb]]></cell></row><row id='26'><cell><![CDATA[26]]></cell><cell><![CDATA[SS]]></cell></row><row id='27'><cell><![CDATA[27]]></cell><cell><![CDATA[SSI]]></cell></row><row id='28'><cell><![CDATA[28]]></cell><cell><![CDATA[CF]]></cell></row><row id='29'><cell><![CDATA[29]]></cell><cell><![CDATA[TC]]></cell></row><row id='30'><cell><![CDATA[30]]></cell><cell><![CDATA[40]]></cell></row><row id='32'><cell><![CDATA[32]]></cell><cell><![CDATA[R]]></cell></row><row id='37'><cell><![CDATA[37]]></cell><cell><![CDATA[Barcode]]></cell></row><row id='34'><cell><![CDATA[34]]></cell><cell><![CDATA[CCE]]></cell></row><row id='35'><cell><![CDATA[35]]></cell><cell><![CDATA[18]]></cell></row><row id='36'><cell><![CDATA[36]]></cell><cell><![CDATA[06]]></cell></row><row id='38'><cell><![CDATA[38]]></cell><cell><![CDATA[MD]]></cell></row><row id='42'><cell><![CDATA[42]]></cell><cell><![CDATA[CNC]]></cell></row><row id='43'><cell><![CDATA[43]]></cell><cell><![CDATA[TR]]></cell></row><row id='44'><cell><![CDATA[44]]></cell><cell><![CDATA[TRcnc]]></cell></row><row id='45'><cell><![CDATA[45]]></cell><cell><![CDATA[HS]]></cell></row><row id='46'><cell><![CDATA[46]]></cell><cell><![CDATA[SLET]]></cell></row><row id='47'><cell><![CDATA[47]]></cell><cell><![CDATA[PC LCD 8,4"]]></cell></row><row id='48'><cell><![CDATA[48]]></cell><cell><![CDATA[AM]]></cell></row><row id='49'><cell><![CDATA[49]]></cell><cell><![CDATA[PRSETT]]></cell></row><row id='50'><cell><![CDATA[50]]></cell><cell><![CDATA[IPL]]></cell></row><row id='51'><cell><![CDATA[51]]></cell><cell><![CDATA[IPU]]></cell></row><row id='52'><cell><![CDATA[52]]></cell><cell><![CDATA[BCNC]]></cell></row><row id='53'><cell><![CDATA[53]]></cell><cell><![CDATA[AA]]></cell></row></rows> but server seems no reply with the correct syntax: <data> <action type="my_error" sid="id" tid="id">Details</action> </data> Sorry for my english :( Thanks in advance! ************************************************************* my code: <script src="dhtmlxGrid/codebase/dhtmlxcommon.js"></script> <script src="dhtmlxGrid/codebase/dhtmlxgrid.js"></script> <script src="dhtmlxGrid/codebase/dhtmlxgridcell.js"></script> <script src="dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js"></script> <script src="dhtmlxGrid/codebase/ext/dhtmlxgrid_srnd.js"></script> <script src="dhtmlxConnector/codebase/connector.js"></script> <script src="dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script> <script src="dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js"></script> <script type="text/javascript"> var mygrid; function doInitGrid() { mygrid = new dhtmlXGridObject('mygrid_container'); mygrid.setImagePath("dhtmlxGrid/codebase/imgs/"); mygrid.setHeader("ID,nome"); mygrid.setInitWidths("100,*"); mygrid.setColTypes("ro,ed"); mygrid.setSkin("dhx_skyblue"); mygrid.attachHeader("#connector_text_filter,#connector_text_filter"); mygrid.setColSorting("connector,connector"); mygrid.init(); mygrid.enableSmartRendering(true); gridQString="connector_preventivi.php"; mygrid.loadXML(gridQString); dp = new dataProcessor("connector_preventivi.php"); dp.init(mygrid); } </script> **************************************************** connector_preventivi.php: <?php require("dhtmlxConnector/codebase/grid_connector.php"); $res=mysql_connect("localhost","root","xxxxxx"); mysql_select_db("gestionale"); $gridConn = new GridConnector($res,"MySQL"); $gridConn-> dynamic_loading(100); $gridConn->render_table("prodotti","ID","ID,nome"); ?> **************************************************** dataProcess Debug: Log: row 1 marked [updated,valid] Initiating data sending for 1 Sending in one-by-one mode, current ID = 1 Server url: connector_preventivi.php parameters gr_id=1 c0=1 c1=Gj !nativeeditor_status=updated Server response received details <?xml version='1.0' encoding='UTF-8' ?><rows total_count='47' pos='0' ><row id='1'><cell><![CDATA[1]]></cell><cell><![CDATA[G]]></cell></row><row id='2'><cell><![CDATA[2]]></cell><cell><![CDATA[F]]></cell></row><row id='3'><cell><![CDATA[3]]></cell><cell><![CDATA[SCD]]></cell></row><row id='4'><cell><![CDATA[4]]></cell><cell><![CDATA[LA]]></cell></row><row id='5'><cell><![CDATA[5]]></cell><cell><![CDATA[AD]]></cell></row><row id='6'><cell><![CDATA[6]]></cell><cell><![CDATA[CdL]]></cell></row><row id='7'><cell><![CDATA[7]]></cell><cell><![CDATA[SL]]></cell></row><row id='8'><cell><![CDATA[8]]></cell><cell><![CDATA[SLL]]></cell></row><row id='9'><cell><![CDATA[9]]></cell><cell><![CDATA[SLU]]></cell></row><row id='10'><cell><![CDATA[10]]></cell><cell><![CDATA[A]]></cell></row><row id='11'><cell><![CDATA[11]]></cell><cell><![CDATA[IP15]]></cell></row><row id='12'><cell><![CDATA[12]]></cell><cell><![CDATA[IP8]]></cell></row><row id='13'><cell><![CDATA[13]]></cell><cell><![CDATA[CE]]></cell></row><row id='15'><cell><![CDATA[15]]></cell><cell><![CDATA[PPC]]></cell></row><row id='16'><cell><![CDATA[16]]></cell><cell><![CDATA[ST]]></cell></row><row id='17'><cell><![CDATA[17]]></cell><cell><![CDATA[LV 3]]></cell></row><row id='18'><cell><![CDATA[18]]></cell><cell><![CDATA[24]]></cell></row><row id='19'><cell><![CDATA[19]]></cell><cell><![CDATA[UPG GOLD]]></cell></row><row id='20'><cell><![CDATA[20]]></cell><cell><![CDATA[UPG FULL]]></cell></row><row id='21'><cell><![CDATA[21]]></cell><cell><![CDATA[GV]]></cell></row><row id='22'><cell><![CDATA[22]]></cell><cell><![CDATA[GD]]></cell></row><row id='23'><cell><![CDATA[23]]></cell><cell><![CDATA[CD]]></cell></row><row id='31'><cell><![CDATA[31]]></cell><cell><![CDATA[LVAA]]></cell></row><row id='25'><cell><![CDATA[25]]></cell><cell><![CDATA[Chiave Usb]]></cell></row><row id='26'><cell><![CDATA[26]]></cell><cell><![CDATA[SS]]></cell></row><row id='27'><cell><![CDATA[27]]></cell><cell><![CDATA[SSI]]></cell></row><row id='28'><cell><![CDATA[28]]></cell><cell><![CDATA[CF]]></cell></row><row id='29'><cell><![CDATA[29]]></cell><cell><![CDATA[TC]]></cell></row><row id='30'><cell><![CDATA[30]]></cell><cell><![CDATA[40]]></cell></row><row id='32'><cell><![CDATA[32]]></cell><cell><![CDATA[R]]></cell></row><row id='37'><cell><![CDATA[37]]></cell><cell><![CDATA[Barcode]]></cell></row><row id='34'><cell><![CDATA[34]]></cell><cell><![CDATA[CCE]]></cell></row><row id='35'><cell><![CDATA[35]]></cell><cell><![CDATA[18]]></cell></row><row id='36'><cell><![CDATA[36]]></cell><cell><![CDATA[06]]></cell></row><row id='38'><cell><![CDATA[38]]></cell><cell><![CDATA[MD]]></cell></row><row id='42'><cell><![CDATA[42]]></cell><cell><![CDATA[CNC]]></cell></row><row id='43'><cell><![CDATA[43]]></cell><cell><![CDATA[TR]]></cell></row><row id='44'><cell><![CDATA[44]]></cell><cell><![CDATA[TRcnc]]></cell></row><row id='45'><cell><![CDATA[45]]></cell><cell><![CDATA[HS]]></cell></row><row id='46'><cell><![CDATA[46]]></cell><cell><![CDATA[SLET]]></cell></row><row id='47'><cell><![CDATA[47]]></cell><cell><![CDATA[PC LCD 8,4"]]></cell></row><row id='48'><cell><![CDATA[48]]></cell><cell><![CDATA[AM]]></cell></row><row id='49'><cell><![CDATA[49]]></cell><cell><![CDATA[PRSETT]]></cell></row><row id='50'><cell><![CDATA[50]]></cell><cell><![CDATA[IPL]]></cell></row><row id='51'><cell><![CDATA[51]]></cell><cell><![CDATA[IPU]]></cell></row><row id='52'><cell><![CDATA[52]]></cell><cell><![CDATA[BCNC]]></cell></row><row id='53'><cell><![CDATA[53]]></cell><cell><![CDATA[AA]]></cell></row></rows> Answer posted by Support on Sep 14, 2009 10:11 Please try to change the order of js files as <script src="dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script> <script src="dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js"></script> <script src="dhtmlxConnector/codebase/connector.js"></script> Answer posted by FiFFiO on Sep 15, 2009 03:41 It works! Very quickly, thanks! |