Hi,
Im very new to this.. So please bear with my ignorance..
I have a Custom control that Contains a RadComboBox and a script(I didnt write the code)..
Only some of the Client Side properties of the Radcombobox have been exposed so far.. I want to
add an event on RadComboBox that will populate a Textbox (placed inside a UpdatePanel) when the SelectedIndex is changed..
I enabled autopostback on the radcontrol and added an event handling mechanism..
However, Whenever I try to click on a value in Radcombobox, I get an error in the WebResource_2.axd error..
Microsoft JScript runtime error: Object doesn't support property or method 'indexOf'
The following line is highlighted
if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var y=j.indexOf("#");if(y!==d)j=j.substr(0,y);
Can someone please guide me on how do I resolve this error?
Here is the relevant code
Im very new to this.. So please bear with my ignorance..
I have a Custom control that Contains a RadComboBox and a script(I didnt write the code)..
Only some of the Client Side properties of the Radcombobox have been exposed so far.. I want to
add an event on RadComboBox that will populate a Textbox (placed inside a UpdatePanel) when the SelectedIndex is changed..
I enabled autopostback on the radcontrol and added an event handling mechanism..
However, Whenever I try to click on a value in Radcombobox, I get an error in the WebResource_2.axd error..
Microsoft JScript runtime error: Object doesn't support property or method 'indexOf'
The following line is highlighted
if(Sys.Browser.agent===Sys.Browser.InternetExplorer){var y=j.indexOf("#");if(y!==d)j=j.substr(0,y);
Can someone please guide me on how do I resolve this error?
Here is the relevant code
...
public event EventHandler click;
public void RaisePostBackEvent(string eventArgument)
{
click1(this, EventArgs.Empty);
}
public virtual void click1(object sender, EventArgs e) {
if (click != null)
click(this, e);
}
private readonly RadComboBox radCombo = new RadComboBox
{
EnableVirtualScrolling = true,
EnableLoadOnDemand = true,
MaxHeight = 300,
Width = Unit.Percentage(100),
ShowMoreResultsBox = true,
ItemsPerRequest = 25,
OnClientItemsRequesting = "comboSetContext",
AutoPostBack = true
};
protected override void CreateChildControls()
{
radCombo.ID = ID + "_cb";
radCombo.ExpandAnimation.Duration = 200;
radCombo.CollapseAnimation.Duration = 200;
radCombo.WebServiceSettings.Path = "/combo.ashx";
radCombo.WebServiceSettings.UseHttpGet = true;
radCombo.WebServiceSettings.Method = ComboHandler;
radCombo.OnClientItemDataBound = "catComboItemDataBound";
radCombo.ToolTip = ToolTip;
if (string.IsNullOrEmpty(ComboHandler))
{
throw new Exception("Must specify a ComboHandler for CatComboBox " + ID);
}
Controls.Add(radCombo);
Controls.Add(new ScriptBlock { Script = "$('#" + ClientID + "_cb_Input').keydown(comboEnterPressed);" });
}