GridConnector.java class

Hi,

I’m new to dhtmlxGrid and already amazed and delighted by the richness and easiness to use the componenets.

I’m having my server side written in Java, so I was using the Java dhtml Connector package.

I wanted to modify my update and insert queries so I was trying to use the con.sql.attach method or con.sql.query method but these were not available in the sql object.

Please assist me on this.

Thanks in advance,
Dushan

To implement custom update and insert queries you can use “beforeUpdate” and “beforeInsert” events. Please find more information here docs.dhtmlx.com/doku.php?id=dhtm … foreupdate

Hi Olga,

Thank you so much for your response. This is exactly what I was trying to do. I used beforeUpdate and beforeInsert methods. But as per the documentation you need to attach the custom SQL statement as follows

gridConn.sql.attach(OperationType.UPDATE,"Update tableA set name='{name}', price={price} where id={id}");

What my problem is the method sql.attach() is not available. I have included dhtmlxconnector.jar into my classpath.

Dushan

Inside “onbeforeupdate” event handler sql.attach() method is not available. You should use sql.query() method. Please check first example here docs.dhtmlx.com/doku.php?id=dhtm … foreupdate