Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Björn Töpper on Jan 30, 2008 00:15
open dhtmlx forum
dhtmlx grid - set cell value from another window

Hi,

I have set an onedit event on a cell --> a new window is open.
I give i and j the cell parameters in the new window.
showWin('/includes/ajax_file_manager/ajaxfilemanager/ajaxfilemanager.php?std=1&i=' + mygrid.getSelectedId() + '&j=' + mygrid.getSelectedCellIndex(),'Upload');

in the new window i will press a button to set the a new value to the cell from the new window
onclick="parent.document.mygrid.cell(<?=$_GET[i];?>,<?=$_GET[j];?>).setValue('<?=$folderInfo['path'];?>');"

$_GET[i] and $_GET[j] are set correctly but i always get a js error if i clicked on my button.
: erwartet

so my question is how to change the value of a cell from another window

Greetings
BjT

Sorry for my english. Im german.
Answer posted by Support on Jan 30, 2008 03:37
The correct command will be
    onclick="opener.mygrid.cells(<?=$_GET[i];?>,<?=$_GET[j];?>).setValue('<?=$folderInfo['path'];?>');"

Answer posted by Björn Töpper on Jan 30, 2008 05:20
Answer posted by Björn Töpper on Jan 30, 2008 05:21

THANKS. It works fine.

The next problem is. The new value is in the cell. If i close my new window and cklick everywhere on the page where the grid is the value in the cell changed to empty.
How can i fix that?

Answer posted by Support on Jan 30, 2008 10:00
Similar situation possible when you have not closed editor in grid. I'm not pretty sure how it can occur in your case, but please try to add next call before setting value.

  onclick="opener.mygrid.editStop();  opener.mygrid.cells(<?=$_GET[i];?>,<?=$_GET[j];?>).setValue('<?=$folderInfo['path'];?>');"
Answer posted by Björn Töpper on Jan 30, 2008 10:18

BIG THX

now it works. :-)