Dynamically create a grid

Is it possible to create a grid dynamically getting the columns and grid information from the server?
I have the need of getting through Ajax all the data of the grid including the configuration (headings, width, etc).
Is this possible?
if so, any examples or tips on how to do that?

You can configure your grid from the xml:
docs.dhtmlx.com/grid__xml_configuration.html
of from the json:
docs.dhtmlx.com/grid__json_configuration.html