Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Janet K. on Aug 20, 2009 06:59
open dhtmlx forum
Initialize DHTMLXGrid in ajax sample

I have following workflow.

An OnClick()-Event starts an Ajax-Request (javascript), which call a servlet to get data from a database. The servlet returns a table with html-tags and within data from the database and put it in a div-area. Instead of the table, I want to use your grid. My question: Where and when should I initialize the grid in this workflow? After that, I want to edit data in the grid.

Beforehand php is not allowed.

Thanks and best regards
Answer posted by Support on Aug 20, 2009 07:03
After table was returned from the server and placed on the page, you can call ( assuming that dhtmlxgrid_start.js used )
         dhtmlXGridFromTable("table_id")
where ID - id of table tag.

It will start table-to-grid conversion. 
http://dhtmlx.com/docs/products/dhtmlxGrid/doc/articles/Init_from_HTML.html#grid_art_inithtml