rad - unable to get type of control for radcombobox in javascript -
i new radcontrols, want know how type of control of radcontrol using javascript, normal asp.net controls write
var controltype=document.getelementbyid("hdncode").type;
the above code give type of control "hidden"
and textbox give "text".
when try type of rad control gives undefined
var controltype=document.getelementbyid("radcombobox1").type;
the above code gives undefined.
please suggest me how type in case of rad controls
thanks
you can't check type of control this, these complex objects (iscriptcontrols) , not simple html elements.
you can try following approach see instances of given type (the if block shows how can make check only):
function get_allradcombos() { var allradcombos = []; var allradcontrols = $telerik.radcontrols; // radcontrols referenced (var = 0; < allradcontrols.length; i++) { var element = allradcontrols[i]; if (telerik.web.ui.radcombobox && telerik.web.ui.radcombobox.isinstanceoftype(element)) { allradcombos.push(element); } } // radcombos gathered array return allradcombos; }
the $telerik.radcontrols array radcontrols create , populate, can check given instance referencing through $find(controlclientid) method