How to use render_sql


I don’t know how render_sql works. I have read the documentation : [url]Connector object DHTMLX Docs

But i just have loaded the data in the first column… I don’t know why i can’t load several columns of my grid with th DB.

In my example, my table is TAB and TABPAB is the primary key. I want load the column 1 of my grid with TABPAB, the column 2 with TABLIG and the last column of my grid with TABUSR.


[...] mygrid.setHeader("Colonne 1, Colonne 2, Colonne 3"); mygrid.setInitWidths("400,400,400"); mygrid.setColAlign("left"); mygrid.setSkin("light"); mygrid.setColSorting("str"); mygrid.setColTypes("ro","ed","ed"); mygrid.init(); mygrid.load("php/data.php"); [...]


[...] $sql = "SELECT * FROM TAB"; $conn->set_encoding("iso-8859-15"); $conn->render_sql($sql,"TABPAB","TABPAB,TABLIG,TABUSR"); [...]

Change the next like
like next

The server side code looks fine. You can try to load the data.php directly in the browser - it must show valid xml with data from mentioned columns.

Thank you Stanislav

My (stupid) mistake was in mygrid.setColTypes :unamused:

It works perfectly.