Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted on Jun 15, 2009 23:50
open dhtmlx forum
popup window

Hi
I am using the dhtmlx grid and i need a pop up window to open when i click on the Country colunm. I am using this code Please help me out by sending the example of popup window on gridcell click


<script language="JavaScript" type="text/JavaScript" src="script/dhtmlXCommon.js"></script>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlXGrid.js"></script>        
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlXGridCell.js"></script>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlXGrid_math.js"></script>
<link rel="STYLESHEET" type="text/css" href="App_Themes/css/dhtmlxcalendar.css"/>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlxcalendar.js"></script>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlxgrid_excell_dhxcalendar.js"></script>
<link rel="stylesheet" type="text/css" href="App_Themes/css/dhtmlXGrid_calck.css"/>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlXGrid_excell_calck.js"></script>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlXGrid_excell_acheck.js"></script>
<script language="JavaScript" type="text/JavaScript" src="script/dhtmlxgrid_excell_sub_row.js"></script>


<div id="gridbox" width="50%" height="300px" style="background-color:white;overflow:hidden"></div>

<script type="text/javascript" language="javascript">
     mygrid = new dhtmlXGridObject('gridbox');
     mygrid.imgURL = "imgs/";
mygrid.setHeader("Hotel,Room,Country,Date,Currency,Plan,Type,Tax,Rates,#cspan,#cspan,#cspan,RateDesc,MealsRates,#cspan,#cspan,#cspan,TaxOn(%),#cspan,Total");
mygrid.setInitWidths("50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50");
mygrid.setColAlign("left,left,left,center,center,left,left,center,right,right,right,right,left,right,right,right,right,right,right,right");
mygrid.setColTypes("sub_row_grid,ro,ro,dhxCalendar,coro,coro,coro,acheck,calck,ed,ed,ed[=c8+c9+c10],txt,ed,ed,ed,ed[=c13+c14+c15],ed,ed,ed[=c11*c17/100+c16*c18/100]");
mygrid.setMathRound(0);
mygrid.enableMathEditing(true); mygrid.setColSorting("str,str,str,str,str,str,str,str,int,int,int,int,int,int,int,int,int,int,int,int,int");
     mygrid.init();
    
     mygrid.loadXML("grid.xml")
</script>

Thanks in advance
Answer posted by Alex (support) on Jun 16, 2009 02:47

Hello,

possibly something as follows can be used:

grid.attachEvent("onRowSelect",function(row_id,column_index){

if(column_index==2) window.open(...)

})