Categories | Question details Back To List | ||
combo.loadXML is not a function Hello, I'm having a hard time setting up the needed comboboxes for my grid. when i select ro and click on column 3 then the below event must be fired but it give me error "combo.loadXML is not a functopn " please tell me what i do . mygrid.attachEvent("onRowSelect",function(row_id,column_index){ //alert(column_index); if(column_index==1) { var value4 = this.cells(row_id,2).getValue(); window.open("newTask.php?shotID="+value4, "width=700px,height=220px,left=150px,top=10px,resize=1,scrolling=0", "recal"); } else if(column_index==3) { var combo = mygrid.getCombo(3); combo.loadXML('data.php'); //combo.enableFilteingMode(true); } return true; }) }) waiting for reply regards Seema Answer posted by Alex (support) on Dec 16, 2009 01:45 Hello, The loadXML method can be applied only to dhtmlxcombo - the "combo" cell type (not the "co"): If you use "combo" type mygrid.setColTypes("...,combo,..."), it is possible to use getColumnCombo method to get dhtmlxcombo object: var combo = mygrid.getColumnCombo(3); Answer posted on Dec 16, 2009 05:12 hello, i m give setColTypes="combo" and write the code then it gives me the below error please tell me what i do "this.grid._col_combos has no properties" "D is not defined" also i m using the below files and my version is v.2.1 professional editor build 90226 version i m using please reply me <script src='codebase/dhtmlxcombo.js'></script> <script src="codebase/dhtmlxcommon.js"></script> <script src="../dhtmlxGrid/codebase/combo/excells/dhtmlxgrid_excell_combo.js"></script> mygrid.setColTypes("ed,link,ro,combo,ed,ed,txt,ed,ed,co,dhxCalendarA,dhxCalendarA,ed,dhxCalendarA,dhxCalendarA,ed,ed"); mygrid.attachEvent("onRowSelect",function(row_id,column_index){ if(column_index==1) { var value4 = this.cells(row_id,2).getValue(); window.open("newTask.php?shotID="+value4, "width=700px,height=220px,left=150px,top=10px,resize=1,scrolling=0", "recal"); } else if(column_index==3) { var combo = mygrid.getCombo(3); combo.loadXML('data.php'); } }) }) data.php <?php header("Content-type:text/xml"); ini_set('max_execution_time', 7000); $res=mysql_connect("localhost","root",""); mysql_select_db("kanibrainnew1"); print("<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>"); $sql = "SELECT shotStatus from shotStatus ORDER BY shotStatus"; print("<complete>"); $res = mysql_query ($sql); if($res){ while($data2 = mysql_fetch_array($res)) { print("<option value=\"".$data2['shotStatus']."\">"); print($data2['shotStatus']); print("</option>"); } }else{ echo mysql_errno().": ".mysql_error()." at ".__LINE__." line in ".__FILE__." file<br>"; } print("</complete>"); ?> please reply me as sson as possisble Answer posted by Alex (support) on Dec 16, 2009 05:50 The answer is given here http://dhtmlx.com/docs/products/kb/index.php?s=normal&q=13517 |