Hello,
I have a grid that opens a new child window when any cell with an index of 9 is selected. The window then displays an attachURL(); page pulling data from a MySQL table and displaying the results. I need to get the data of the first cell of the selected cell’s row and send that data to the URL page to run the appropriate MySQL query. Is there a way to do this?
Thank you,
Grid and Window Init:
<div id="gridbox" style="padding-right: 5%; padding-left: 5.5%; padding-bottom: 2%; border: none; width: 78%; height: 680px;"></div>
<br/>
<br/>
<script>
mygrid = new dhtmlXGridObject('gridbox');
mygrid.setImagePath("./codebase/imgs/");
mygrid.setHeader("WO,C.R. Start,Prod Stage,Customer,Part Number,FT<sup>2</sup>,Total Units,CR1,CR2,Floor Notes,Production Notes");
mygrid.attachHeader("#text_filter, ,#text_filter,#text_filter, , , ,#text_filter,#text_filter, , ,");
mygrid.setInitWidthsP("5,8,8,9,10,4,4,6,6,6,*"); //the widths of columns
mygrid.setColAlign("center,center,left,left,center,center,center,center,center,center,left"); //the alignment of columns
mygrid.setColTypes("ro,ro,ro,ro,ro,ro,ro,ro,ro,ro,ro"); //the types of columns
mygrid.setColSorting("str,str,str,str,str,str,str,str,str,str,str,str,str"); //the sorting types
mygrid.setColumnIds("workorder,cleanroom_start,productionstage,customer,partnumber,totalsqft,quantity,claveid,claveid2,floornotes,productionnotes")
var combobox = mygrid.getCombo(2);
combobox.put("Cleanroom Done","Cleanroom Done")
mygrid.attachEvent("onCellMarked",doOnCellSelected);
mygrid.enableMarkedCells(true);
mygrid.enableBlockSelection(true);
mygrid.enableRowsHover(true,'grid_hover');
mygrid.init(); //finishes initialization and renders the grid on the page
//=========================================================================================
mygrid.load("gridview_Testing_GET.php");
myDataProcessor = new dataProcessor("gridview_Testing_UPDATE.php");
myDataProcessor.enableDataNames(true);
myDataProcessor.setUpdateMode("cell");//available values: cell (default), row, off
myDataProcessor.setTransactionMode("GET");
myDataProcessor.init(mygrid);
//============================================================================================
function doOnCellSelected(rid,ind,sgref) {
if (ind == 9) {
var dhxWins = new dhtmlXWindows();
wFloornotes = dhxWins.createWindow("wFloornotes", 100, 100, 450, 400);
wFloornotes.setText("Floornotes");
wFloornotes.center();
wFloornotes.attachURL('floornotes_datalist.php');
}
}
</script>