Questions re: Grid, DataProcessor, and DataConnector (gr

Awesome product!

I have standard edition DHTMLX suite (upgrading to Pro as soon as I’m comfortable with the basics)



Inside the suite package, I am using the .js file, .css file and imgs folder that I found in dhtmlx_std_full.zip within the downloaded suite.



I have a dhtmlxgrid, which is attached to one cell of dhtmlxlayout. Here is the client-side code I use to build the grid, and connect it to the dataprocessor/dataconnector:



----------------------------------------------------------------

var mygrid;



function doInitGrid(){

    



    mygrid = new dhtmlXGridObject(‘gridHolder1’);



     mygrid.setImagePath(“dhtmlx/imgs/”);



     mygrid.setHeader(“A,B”);

     mygrid.attachHeader("#text_filter,#text_filter");

    

     mygrid.setColTypes(“ed,ed”);

mygrid.setColSorting(“str,str”);

     mygrid.setInitWidths(“150,150”);



mygrid.setSkin(“light”);

    

     mygrid.init();

    

     mygrid.loadXML(“myDataProcessor.php”);



     var dp = new dataProcessor(“myDataProcessor.php”);

     dp.setUpdateMode(“cell”);

     dp.init(mygrid);

}



---------------------------------------------------------------------



I get the grid, populated with data from my database table. I can edit fields in the grid, and the text goes BOLD to indicate that I have made a change. However, the data does not get written to the database (ie grid does not update).



I have tried dp.setUpdateMode(“cell”); as shown above, and also tried it with NO declaration for setUpdateMode (ie the default).



Here is the code in the myDataProcessor.php file:



----------------------------------------------------------------------

<?php

require_once(“dhtmlx/connector/grid_connector.php”);

$res = mysql_connect(“localhost”,“SmartFX”, “1asca1a”);

mysql_select_db(“lascala”);



$grid = new GridConnector($res);





$grid->render_table(“tblcontacts”,“contact_ID”,“contact_name_last,contact_name_first”);

?>

-----------------------------------------------------------------------



Am I missing something?



Please try to enable loggin:
$grid->enable_log(“some.txt”);
Now, component will write all auto-generated queries and info about sql errors in the log file.
If issue still occurs - please provide the otput of server side log.

Here is the output of the log file.   It appears that the processor file is not even attempting to issue an UPDATE query:   I open my page,   made a few edits…   and then I refreshed the entire page, and tried again.



====================================
Log started, 28/08/2009 03:08:18
====================================

Ready for SQL generation
field =>
    0 =>
        0 => contact_name_last
        1 => contact_name_last
    1 =>
        0 => contact_name_first
        1 => contact_name_first
id =>
    0 => contact_ID
    1 => contact_ID
table =>
    0 => tblcontacts
    1 => tblcontacts

Exec SQL: SELECT contact_ID , contact_name_last , contact_name_first FROM tblcontacts

Done in 0.0034618377685547ms



====================================
Log started, 28/08/2009 03:08:26
====================================

Ready for SQL generation
field =>
    0 =>
        0 => contact_name_last
        1 => contact_name_last
    1 =>
        0 => contact_name_first
        1 => contact_name_first
id =>
    0 => contact_ID
    1 => contact_ID
table =>
    0 => tblcontacts
    1 => tblcontacts

Exec SQL: SELECT contact_ID , contact_name_last , contact_name_first FROM tblcontacts

Done in 0.0059630870819092ms



====================================
Log started, 28/08/2009 04:08:59
====================================

Ready for SQL generation
field =>
    0 =>
        0 => contact_name_last
        1 => contact_name_last
    1 =>
        0 => contact_name_first
        1 => contact_name_first
id =>
    0 => contact_ID
    1 => contact_ID
table =>
    0 => tblcontacts
    1 => tblcontacts

Exec SQL: SELECT contact_ID , contact_name_last , contact_name_first FROM tblcontacts

Done in 0.0055909156799316ms


Can you please provide us complete demo where we can reproduce this issue? What version of dhtmlxGrid and dhtmlxDataProcessor do yo use?

Please see the attached demonstration. 

The grid is within a cell of a dhtmlx layout

The grid is populated by the myDataProcessor.php  (connector)…   and I can edit the info (and text goes BOLD).
However it does not “save” the data to the database.

I’m not sure of the version numbers.  But I downloaded the full dhmtlx standard suite within the past 10 days.    I’m using the dhtmlx.js and dhtmlx.css files (everything in one file)

Thanks for you help.   A very nice product indeed… keep up the good work!

forDhtmlxSupport.zip (645 KB)

This issue occurs because of you didn’t include connector.js file to your page. Add

after

in the index.html file.

Thank you very much for taking the time to help me with this.   I am looking forward to purchasing the PRO version of you suite.   Is there a new version coming soon?

Yep, the next major update will be released till the end of this week.