hi everybody, I'm newbie to using Infragistics. I'm having a problem with fetching the values from a webcombo control on the client side after a value has been selected on the dropdown. I keep getting the error via the alert box "Initialize should be a function, function name, or function text".
Here is my code:
function WebCombo1_AfterSelectChange(webComboId){ //Add code to handle your event here. if (!_WebCombo1Cntrl.getGrid().oActiveRow) return; alert(_WebCombo1Cntrl.getGrid().oActiveRow.getCellFromKey("ProductID").getValue()); alert(_WebCombo1Cntrl.getGrid().oActiveRow.getCellFromKey("ProductName").getValue(); document.getElementById('TextBox1').Value = _WebCombo1Cntrl.getGrid().oActiveRow.getCellFromKey("ProductID").getValue();
}
If anybody can give me a hand, i would appreciate it. thank you so much.
I am having the same issue, but with a different client side event (DropDownClosed). I have the following line of code in the codebehind:
cboUnderwriter.ClientEvents.DropDownClosed = "OncboUnderwriterDropdownClosed";
I then created a Javascript function named OncboUnderwriterDropdownClosed in the ASPX file. The function simply has an altert statement to indicate it works. However, I get the similar error reported by hew0n0.
The issue is that the Javascript function is not being recognized.
You are suggesting to use a different event with a different Javascript function. So, I think your suggestion is not helping in debugging the underlying issue, which is making the Javascript function work in the first place.
Fernando.
Hello,
I would suggest you to try an easier way to get selected value of WebCombo like this:
17 function WebCombo1_AfterSelectChange(webComboId){
18 //Add code to handle your event here.
19 var oCombo = igcmbo_getComboById(webComboId);
20 var selectedValue = oCombo.getDisplayValue();
21 }
Hope it helps you.