Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sandesh on Sep 29, 2008 07:34
open dhtmlx forum
Updating Subgrid

I have subgrid inside a gird. Both grid and subgrid gets loaded perfectly fine. Subgrid has multiple rows. Grid also has multiple rows. Paging is enabled for the top grid but not for sub grid.

The objective is to modify data(cell data) corresponding to couple of rows in the sub grid. Once I modify the data, the modified data is sent to the server side code(servlets) where it is processed and saved to the database which is working perfectly fine.

The problem is in rendering data belonging to subgrid. As part of saving data to database, certain rows in database are updated and new rows are added. Now, when I use updateFromXML(url,true,false) method for the subgrid it updates the existing rows. However it doesn't show a new row. But the xml content has the new row information in it. So is there any reason why it can't show the new row.

I'm using dhtmlxSuite_pro_2008Rel2_80512. Can you please guide me on this problem?

Thanks,
Sandesh
Answer posted by Support on Sep 29, 2008 15:42
You are using correct command syntax, so if XML contains row with unique IDs - new rows must be added to the grid. 
Possible problem can be caused by not updating subgrid size, so new rows added but just not visible
Please try to extend your command as 

subgrid.updateFromXML(url,true,false,function(){
    //after data loaded
    subgrid.callEvent("onGridReconstructed",[]); //fire event, which will force view update
})