I have a grid PHP grid on a main window
and I open a popup window using window.open in which there is a second grid PHPGRID.
Would need to modify the values of the grid from the popup window from the main window is it possible?
You would need to use window.opener from new window to access parent.
http://www.codeproject.com/Articles/25388/Accessing-parent-window-from-child-window-or-vice
It is precisely what I'm using and does not work for me.
In the main window I have the grid PHPGRID called materiales
In the popup window is the PHPGRID grid called resumen
What I need is to navigate through the grid of the main window
and update the data in the popup window grillla
the code I use is:
var filaresumen = 0;
for ( var i = 0; i< filas ; i++) {
var mater = jQuery('#materiales').jqGrid('getCell', i , 'COD_MATER');
window.opener.$('#resumen').jqGrid('setCell', filaresumen, 'MATER' , mater );
++filaresumen;
}
filas is the number of rows in the main window grrilla
COD_MATER is the title of the column of the grid that I want to update on the grid popup window
2 suggestions …
1) If you are using this code in popup page & materiales grid is on parent, then … window.opener will be used with materiales not resumen.
window.opener.jQuery('#materiales')……
2) In get/sellCell, you need to pass column name set in $col["name"] as 3rd argument (not title).