New windows on Double click

Hi every one, I have a layout which included a grid in which I have the double click event and i generate a new windown when the user do that.

I would like it if the user did double click on the grid, do not let that window generate again, is there a way to enable / disable column?, Or any condition to prevent a repeat window.

Thanks in advance to all …

This is my code:



    <div id="protocol" style="position: relative; bottom: 0 px; left: 0 px; width:400px;height:200px;overflow:auto;"></div>


<script>

function doOnRowDblClicked(rowId, cellInd) {

protocolIt("Se hizo clickl en la fila " + rowId + " en el checkbox de la celda  " + cellInd );
	
	var value_port_1 = dhxGrid2.cells(rowId,0).getValue();
	var value_port_2 = dhxGrid2.cells(rowId,1).getValue();
	var GPON_Port = value_port_1 + " @ " + value_port_2;
		
	var dhxWins;

	dhxWinsParams = {
        image_path: "../../codebase/imgs/",
        viewport: {
            object: "parentId"
        },
        wins: [{
            id: "w1",
            left: 20,
            top: 30,
            width: 320,
            height: 240,
			text: GPON_Port 
        }]
		};
	
	dhxWins = new dhtmlXWindows(dhxWinsParams);
	return true;

}

function protocolIt(str) {

    var p = document.getElementById("protocol");
	p.innerHTML = "<li style='height:auto;'>" + str + "</li>" + p.innerHTML
}



var dhxLayout, dhxGrid, dhxTree;
	
		dhxLayout = new dhtmlXLayoutObject("parentId", "3L");
	
		dhxLayout.cells("a").setText("OLT");
		dhxLayout.cells("b").setText("Puertos PON");
		dhxLayout.cells("c").setText("Usuarios / ONT Linked");
		dhxLayout.cells("c").attachObject("protocol");

		

		dhxGrid = dhxLayout.cells("a").attachGrid();
		dhxGrid.attachEvent("onRowSelect", doOnRowSelected);

		dhxGrid2 = dhxLayout.cells("b").attachGrid();
		dhxGrid2.attachEvent("onRowDblClicked", doOnRowDblClicked);
dhxGrid.loadXML("Data/OLT.xml?etc="+new Date().getTime());

		
		dhxGrid2.loadXML("Data/PuertoPON.xml?etc="+new Date().getTime());

</script>

Hi,

you need to set check in the onDoubleClick handler (do not create a window if it is already created).