Setting grid values server side

My application has the following requirement and knowing how to do this may be useful for other cases too but here is the main one…

grid.setDateFormat("%m/%d/%Y")

I have the date format as a user setting in a database so I need a way to get this value to javascript, most likely using php. Here is an example of what I need

var dateFormat = someFunction(“getDateFormat.php”);
grid.setDateFormat(dateFormat)

Is there a way to do this?

You may try to use the ajax request to get the varieble to the client-side.
For example:

dhtmlxAjax.get("getDateFormat.php",function(loader){ grid.setDateFormat(loader.xmlDoc.responseText) });