Pop-up inside a dhtmlxGrid

Hi, its possible to add a pop-up inside a dhtmlxGrid? or a dhtmlxWindow component? i mean, into a grid put one column of links that open new windows in order to to display websites, images and other content in a beautiful way, i.e, using ligth box or dhtmlxWindow effects??



thanks in advance for your reply!!



eulerss

There is no any special support for such scenario, but grid allows to execute any custom kind reaction of specified cell clicking ( through onRowSelect event or through custom HTML elements|events directly inside the cell ) , which can include opening of custom windows.

Please inform if you need a sample of such functionality.


>which can include opening of custom windows.



i open a new window with:



“<cell type=“link”>”;



that’s the way that you are talking about? If not, can you send me a simple sample with the funcionality?



Thanks in advance foy your quick replay!!


To create dhtmlxWindow by clicking on some column you can use �onRowSelect� event:


//creating dhtmlxWindow
dhxWins = new dhtmlXWindows();
dhxWins.setImagePath(“dhtmlxWindows/codebase/imgs/”);

mygrid.attachEvent(“onRowSelect”,function(rowId,cellIndex){
//creating window of the dhtmlxWindows.
var w1 = dhxWins.createWindow(“w1”, 150, 10, 700, 500);

w1.setText(�new Window�);


w1.attachURL(“http://www.google.com”,true);



});

hi, here’s my code, a window appears with the URL but 'm not able tu close that windows.

thanks for your help

function doOnRowSelected(rowID,celInd){

        if (celInd==8){
        alert(“Selected row ID is “+rowID+”\nUser clicked cell with index “+celInd);
        //creating dhtmlxWindow
        dhxWins = new dhtmlXWindows();
        dhxWins.setImagePath(”./dhtmlxWindows/dhtmlxWindows/codebase/imgs/”);
        mygrid.attachEvent(“onRowSelect”,function(rowID,cellIndex){
        w1 = dhxWins.createWindow(“w1”, 150, 150,700, 700);
        w1.setText(“Choose the Parameters for the Report”);
        w1.attachURL(“http://www.google.com”);

        }
)};



Hello,


When is doOnRowSelected called ?


It seems that you defined several onRowSelect handlers. Please, try to use the following approach - possibly it’ll fix the problem


var dhxWins = new dhtmlXWindows();


grid.attachEvent(“onRowSelect”,function(rowID,celInd){

if (celInd==8){
alert("Selected row ID is “+rowID+”\nUser clicked cell with index "+celInd);
//creating dhtmlxWindow
w1 = dhxWins.createWindow(“w1”, 150, 150,700, 700);
w1.setText(“Choose the Parameters for the Report”);
w1.attachURL(“http://www.google.com”);
}
});







>>When is  doOnRowSelected called ?



here



mygrid.attachEvent(“onRowSelect”,doOnRowSelected);




i used your sample code, but it doesnt work, here is the complete code









thanks for your time and for your help!!


You have set 2 onRowSelect event handlers. Please, try to set one:





var dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("./dhtmlxWindows/dhtmlxWindows/codebase/imgs/");


function doOnRowSelected(rowID,celInd){

if (celInd==8){

w1 = dhxWins.createWindow(“w1”, 150, 150,700, 700);
w1.setText(“Choose the Parameters for the Report”);
w1.attachURL(“http://www.google.com”);

}

}




hi, thanks for your quick reply, i was wrong with my code (i was defining several times onRowSelect, like you said) a window appears when i clicked celInd==8, but i’m having the same problem, i mean, i cannot close that windows (the window appear like a div), many thanks for your last reply!!



var dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("./dhtmlxWindows/dhtmlxWindows/codebase/imgs/");



function doOnRowSelected(rowID,celInd){



        if (celInd==8){
        w1 = dhxWins.createWindow(“w1”, 150, 150,700, 700);
        w1.setText(“Choose the Parameters for the Report”);
        w1.attachURL(“google.com”);



    }



}



Hello,


please, provide the complete sample to reproduce the issue. Locally the same code works correctly.


hi, here is the complete issue





Data Grid


























 


   mygrid = new dhtmlXGridObject(‘mygrid_container’);
   mygrid.setImagePath("./dhtmlxGrid_pro_v16_80512/dhtmlxGrid/codebase/imgs/");
   mygrid.setHeader(“Orden de
Compra, Pedido
Helvex, Fecha de captura, Estatus del pedido, Tipo Pedido, Total
Bruto, Total Neto, Notas, Envios”);
   mygrid.setInitWidths(",,,,,,,,*");
   mygrid.setColAlign(“left,right,right,center,center,right,right,center,center”)
   mygrid.setSkin(“light”);
   mygrid.setColSorting(“str,int,int,str,str,price,int,int,int”);
   mygrid.setColTypes(“link,ed,date,str,str,price,price,link,link”);
   mygrid.attachEvent(“onRowSelect”,doOnRowSelected);
   mygrid.enablePaging(true,10,5,“pagingArea”,false,“infoArea”); 

   mygrid.init();
   mygrid.loadXML("./load.php");



var dhxWins = new dhtmlXWindows();
dhxWins.setImagePath("./dhtmlxWindows/dhtmlxWindows/codebase/imgs/");



function doOnRowSelected(rowID,celInd){
        if (celInd==8){
        w1 = dhxWins.createWindow(“w1”, 150, 150,700, 700);
        w1.setText(“Choose the Parameters for the Report”);
        w1.attachURL(“google.com”>Show]]></cell>



thanks again!!


Hello,


the code is correct. The code works correctly locally. But one thing…


Why did you use <cell type=“ro”><![CDATA[Show]]> ?


The window url is set by w1.attachURL(“http://www.google.com”);


Try to download the latest window package and use its libraries. If the issue still persists, please, provide the complete demo (with used js an css files).


hi, i’m so sorry but i was cheking some things in my work, that’s the way i didn’t anwer before, i resolved the problem with these line



 








it seems that on window object i must indicated the skin, it was my mistake



thanks a lot for your support dhtmlx team!!



 



 

Anonymous hello, I’m new to this and am trying to make an order very similar to yours, could you help me a little and how to create the load.php file please.

Thank you very much.

Hello, Mery
In new 3.6 version new component dhtmlxPopup was released. You can use in i.e. in onRowSelect event:

grid.attachEvent(“onRowSelect”, function(id,ind){
popup.show()
});

Documentation and samples with popup:
docs.dhtmlx.com/doku.php?id=dhtmlxpopup:toc
dhtmlx.com/docs/products/dht … p/samples/