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


Hello,


The loadXML method can be applied only to dhtmlxcombo - the “combo” cell type (not the “co”):


dhtmlx.com/docs/products/dht … combo.html


If you use “combo” type mygrid.setColTypes("…,combo,…"), it is possible to use getColumnCombo method to get dhtmlxcombo object:


var combo = mygrid.getColumnCombo(3);
combo.loadXML(‘data.php’);




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/dhtmlxcommon.js”>
    <script  src="…/dhtmlxGrid/codebase/combo/excells/dhtmlxgrid_excell_combo.js">



    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("");
            $res = mysql_query ($sql);
        if($res){
            while($data2 = mysql_fetch_array($res)) {
   
                print("<option value="".$data2[‘shotStatus’]."">");
                print($data2[‘shotStatus’]);
                print("");
            }
        }else{
            echo mysql_errno().": “.mysql_error().” at “.LINE.” line in “.FILE.” file
";
        }
        print("");

   
        ?>

 please reply me as sson as possisble

The answer is given here dhtmlx.com/docs/products/kb/inde … al&q=13517