Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Sanju Thomas on Jun 11, 2009 23:37
open dhtmlx forum
is there away to get html of the grid generated by DHTMLX ?

hi ,

I have a requirement where I have to move the grid generated by the dhtmlx to a pdf. I don't get html of the grid in the source currently. Is there a way I can get the html generate by the DHTMLX so that I can use it to generate PDF ?
Answer posted by Support on Jun 12, 2009 01:57
You can get inner HTML of grid as 

var html = grid.entBox.parentNode.innerHTML;

where grid - reference to grid object. 

Beware that in srnd or paging modes grid has not all data rendered - so innerHTML will contain only part of grid's data. 
It may be a more simple way - to serialize grid to xml and build PDF based on XML data
Answer posted by Sanju Thomas on Jun 12, 2009 01:59
what do you mean by serializing the grid to xml ? How is it going to help me ? I need kind of screenshot of the grid in the PDF.
Answer posted by dhxSupport on Jun 12, 2009 03:47
dhtmlxGrid is fully client side component. Conversion grid to PDF is really server side task. Grid can serialize itself as XML or CSV - which can be used to further transformation on server side. Please see more information here http://dhtmlx.com/docs/products/dhtmlxGrid/doc/guide.html#grid_serialize
http://dhtmlx.com/docs/products/dhtmlxGrid/doc/guide.html#grid_csv
Serializtion grid into XML\CSV formats is availible only in PRO version. 
Answer posted by Sanju Thomas on Jun 12, 2009 03:53
I agree. Thanks for the support. You guys are doing a great job.
Answer posted by Sanju Thomas on Jun 12, 2009 03:53
I agree. Thanks for the support. You guys are doing a great job.