Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by kiko on Jun 13, 2008 08:00
open dhtmlx forum
dhtmlcombo and C#

I set up the dhtmlxcombo in c# with a dropdownlist and it gets all info and filters. The selectedIndexchange event does not fire when I click on a option. Is there a certain way to setup so selectedindexchange fires?
Answer posted by Support on Jun 13, 2008 09:39
The combo doesn't supports native HTML events, but it has its own onChange event

combo.attachEvent("onChange",function(){
    //any custom code here
    alert(combo.getActualValue());
});
Answer posted by kiko on Jun 13, 2008 10:15
Thanks but got the answer to it the code that I took out is below, now I have to figure out the mouse click event capture with the _keycode.

 dhtmlXCombo.prototype._onKeyF = function(e){
 var that=this.parentNode.combo;
 var ev=e||event;
  if(ev.keyCode=="13" || ev.keyCode=="27" ){
 that.closeAll();

commented out this line in dhtmlxcombo.js then the selectindexchanged worked.  ->> //return false;
}
 return true;
}
Answer posted by Support on Jun 16, 2008 04:09
According to provided code - it seems that you are using older code, please try to use latest version ( can be taken from http://www.scbr.com/docs/products/dhtmlx.com/download/dhtmlxCombo.zip )
It must generate correct onChange event for any type of selection.
Answer posted on Jun 16, 2008 10:41
Thanks for pointing me to the new code that solved all the problems I was having.