Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tanu Dua on Aug 13, 2009 23:08
open dhtmlx forum
Reload new DhtmlxGrid from Table

Hi,

I am creating DhtmlxGrid from table using :

var mygrid = new dhtmlXGridFromTable("basicgridbox");

So , Grid is made out of the table and not from the xml.

There are two tabs on the page , one tab shows the certain set of columns and the second tab shows the other set of columns.
By default , on page load the first tab is selected.

I have browsed through the documentation and found that we can reload the grid using an API :

mygrid.clearAll(true);
mygrid.loadXML("gridH3.xml");

But , it requires an XML , however my implementation is dependent on table.

Do we have any reload strategy from table ?



Thanks.

Answer posted by Support on Aug 14, 2009 02:32
>>Do we have any reload strategy from table ?
if you have some other table on the page, you can try to use

var table = document.getElementById(table_id);

mygrid.clearAll()
mygrid.load(table, "html");

Beware that 
a) only data will be loaded from the table ( not the structure of columns ) 
b) after data loading, original table will be destroyed.