Hello Sematik,
thanks for reply.
Sorry but i’m newbie and I just don’t know how to define it.
Can you tell me how ?
I thought that i could get ‘file_upload’ like I can get ‘id’.
$treeConn = new TreeConnector($res); // connector object; parameters: db connection and the type of the using db
function custom_format($item){
$item->set_userdata("file_upload", $item->get_value("file_upload"));}
$treeConn->render_sql("SELECT id_docs,title_docs,ref_id,file_upload FROM docs ORDER BY ref_id ASC","id_docs","title_docs,file_upload","","ref_id");// data configuration
But it doesn’t work.
Alert is empty and so the page…
Thanks for your help !
Your “connector.php” returns the generated xml file for your dhtmlxGrid.
Could you please, clarify what your “file_upload” variable should return.
As you may get the userdata for your grid/row on client-side using the API: docs.dhtmlx.com/grid__userdata.html#userdata
To answer your question : my “file_upload” variable should return the names of the files (i.e. : numeros.pdf)
To be more clear :
My database stocks folders and files names :
"id_docs";"ref_id";"title_docs";"file_upload";
"751";"0";"0";"Consignes obligatoires";;
"1";"751";"Documents de référence";;
"305";"1";"Consignes générales de sécurité";;
"747";"305";"Numeros urgences";"numeros.pdf";
"754";"0";"Procédures";;
"8";"754";"Ressources humaines";;
"293";"8";"Gestion de la formation";;
"325";"293";"Demande de formation";"demande_formation.pdf";
My tree displays these folders and files names (files are stocked in “…/works/docs_upld/”).
Finally I just want :
to open the file when I click on the file name in my tree (i.e. : when I click on “numeros urgence” it opens the file “numeros.pdf”).
and to opens nothing when it’s a parent with child (folder) (i.e. “Procédures”).
Thank you for your patience
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan