Categories | Question details Back To List | ||
scheduler extra data Hello, I'm trying to get extra values from a render_sql query using the 4th parameter width php connector, for example: $scheduler->render_sqll("Select * from tableA, tableB where tableA.id=tableB.id", "table_a_id","name,price,other","extra1,extra2", "") I wondered how I can get the values extra1 and extra2 in order to be used scheduler.templates.event_text=function(start,end,event){ return "Name:<b> "+event.name+"</b><br><br>"+"Extra: "+event.extra1; } It works good with the name, but not for extra. I certainly forgot something but don't know what? (despite of looking for the documentation and the knowledge base. Could you help me? Thanks (sorry for my bad english) Answer posted by Alex (support) on Dec 22, 2009 01:40 Hello, extra1 and extra2 should defined in the 3rd parameter of render_sql method to be passed with xml to the client side: $scheduler->render_sql("Select * from tableA, tableB where tableA.id=tableB.id", "table_a_id","name,price,other,extra1,extra2"); The 4th parameter is used to define fields that should be accessible in all inner event, but shouldn't be included in data rendering.
Answer posted by Mosaic on Dec 22, 2009 01:57 Thanks for your answer. I can't use extra1 and extra2 in 3rd parameters because I use auto-update and these fields are in another table. According to http://www.dhtmlx.com/dhxdocs/doku.php?id=dhtmlxconnector:loading_editing_data Is there a way to show these fields (in 4th parameters) in data rendering by get them throw an inner event? (I have difficulties to understand inner event). The solution may be to use define different configs for select and update operations, but I can't find such a code in the samples. Answer posted by Alex (support) on Dec 22, 2009 06:13 If extra1 and extra2 should be passed to the client, it is necessary to put them in the 3rd parameter. But you can define custom update handler: http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxconnector:complex_updates Answer posted by Mosaic on Dec 22, 2009 15:18 I defined custom handlers for insert, update and delete and it works! Thank you very much for your help. |