Grid cell link to dhxWin

Dear Sir,

I have the problem of the grid, if I have a grid and the cell has a special link, when click the link, it will display the dhtWin.
Could you tell me that it can do it or not.

Thank you,
Kenneth Cho

Unfortunately your issue is not clear. Could you please, clarify it with the code or the screenshots.

Dear Sir,

I am sorry that it is not clear to tell you in the word. So I post the jpg to describe it.
Thank you .

Best Regards,
Kenneth Cho


If you need to show a dhtmlxWindow on link clicking in the dhtmlxGrid you may try to use the “link” column type. It supports the usage of the javascript functions.
Here you can find a tutorial:
docs.dhtmlx.com/grid__columns_ty … inkscolumn

Dear sir,

In fact, I try the link button this sample, but not work.

The code in there, please help or give me the coding suggestion , I don’t know what’s wrong. many thanks.

main.php

myGrid = new dhtmlXGridObject('gridbox');
			myGrid.setImagePath("dht/codebase/imgs/");
			myGrid.setHeader("title,title1");
			
			myGrid.setInitWidths("100,100");
			myGrid.enableAutoWidth(true);
			myGrid.enableColumnMove(true);
			myGrid.setColAlign("left,left");
			myGrid.setColTypes("ro,link");
			
			myGrid.setColSorting("str,str");
			
			
			
			myGrid.load("test_Grid_Cell_Link_to_dhxWin.php",function(){
				
				myGrid.groupBy(1);
				
			});

test_Grid_Cell_Link_to_dhxWin.php

<?php 

	if ( stristr($_SERVER["HTTP_ACCEPT"],"application/xhtml+xml") ) {
		header("Content-type: application/xhtml+xml"); 
	} 
	else {
		header("Content-type: text/xml");
	}
		echo "<script type='javascript'>
				function test_win(){}
					var dhxWins, w1;
					dhxWins = new dhtmlXWindows();
					dhxWins.attachViewportTo('gridbox');
				
					w1 = dhxWins.createWindow(''1', 20, 30, 320, 200);
					w1.setText('dhtmlxWindow #1');
					w1.button('close').disable();
				}
			</script>	
		";

		echo "<rows>";

		

		   	   
		echo "<row id='1001'><cell>test1</cell><cell>test_link^javascript:test_win();^_self</cell></row>";
		   	   
	
		echo "</rows>";
	
?>

many thanks.

Your test_win() function should be not in the generated xml.
Please, try to defined it in the main.php file.

yes…many thanksssssssss. :laughing: :laughing: :laughing: :laughing: