I have a parent form and a sub form. Whenever I load a parent form, the function below was triggered and display data in the grid. This is fine.
On the parent form I have a button, whenever I click this button, a sub form will popup.
In the sub form I have another button, whenever I click this button, I want to reload the grid.
Is it possible to reload grid data (in parent form) from sub form? How do I do that?
function doOnLoad()
{
mygrid = new dhtmlXGridObject('dgridDataList');
mygrid.setImagePath('dhtmlx/dhtmlxGrid/codebase/imgs/');
mygrid.submitOnlyChanged(false);
mygrid.setFieldName("{GRID_ID}_{ROW_INDEX}_{COLUMN_INDEX}");
mygrid.init();
mygrid.setSkin("dhx_skyblue")
gridQString = "data_load.asp";
mygrid.loadXML(gridQString);
}
I have tried your suggestion but still no success. This is my codes.
–parent form
–sub form
window.opener.document.getElementById(‘dgridDataList’).clearAll();
window.opener.document.getElementById(‘dgridDataList’).load(‘subformload.asp’);
<< You should use:
<< mygrid.clearAll();
<< mygrid.load(“url”);
I know I can use above method to reload grid in “PARENT FORM” (where I create, init and load xml), but my question is can I call mygrid.clearAll(); and mygrid.load(“url”); methods from “POPUP FORM”?