Hi, I want to disable AllowCustomText in RadComboBox I find this article AllowCustomText Cannot Be Disabled When Loading Items on Demand and try to implement it. I set these property in my onLoad method​:
EnableLoadOnDemand =
false
;
EnableViewState =
true
;
ShowMoreResultsBox =
true
;
EnableVirtualScrolling =
true
;
AppendDataBoundItems =
true
;
ShowToggleImage =
true
;
NoWrap =
true
;
AllowCustomText =
false
;
MarkFirstMatch =
true
;
HighlightTemplatedItems =
true
;
DropDownWidth = 350;
MaxHeight = 250;
Filter = RadComboBoxFilter.Contains;
and register these events
ItemsRequested +=
new
RadComboBoxItemsRequestedEventHandler(comboItemsRequested);
OnClientDropDownOpening =
"OnClientComboBoxDropDownOpeningHandler"
;
where client script is
function
OnClientComboBoxDropDownOpeningHandler(sender, eventArgs) {
try
{
sender.requestItems(
""
,
false
);
}
catch
(e) {
radalert(e.message +
"<br>"
+ e.stack)
}
}
My combobox is defined in modal window so it is shown on user request and hide after selection. It works perfectly when I open it for the first time. But if I open combobox, hide the dialog and open it again then it doesn't work. Clicking on combobox doesn't start dropDown event and the script. For testing I add the same client script on event OnClientKeyPressing. It starts the script, but it throws this exception:
b is undefined
and stack trace:
Telerik.Web.UI.ControlItem.prototype._initialize@http://localhost:60103/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_ctl00_ctl00_ContentBody_ContentMain_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+Telerik.Web.UI%2c+Version%3d2013.3.1114.40%2c+:1978:1
b.RadComboBox._createChildControls@http://localhost:60103/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_ctl00_ctl00_ContentBody_ContentMain_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+Telerik.Web.UI%2c+Version%3d2013.3.1114.40%2c+:3850:1
b.RadComboBox.prototype._createChildControls@http://localhost:60103/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_ctl00_ctl00_ContentBody_ContentMain_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+Telerik.Web.UI%2c+Version%3d2013.3.1114.40%2c+:3317:1
b.RadComboBox.prototype._ensureChildControls@http://localhost:60103/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_ctl00_ctl00_ContentBody_ContentMain_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+Telerik.Web.UI%2c+Version%3d2013.3.1114.40%2c+:3318:67
b.RadComboBox.prototype.requestItems@http://localhost:60103/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_ctl00_ctl00_ContentBody_ContentMain_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+Telerik.Web.UI%2c+Version%3d2013.3.1114.40%2c+:4659:2
OnClientComboBoxDropDownOpeningHandler@http://localhost:60103/Js/ContentClient/def_content_client.js?v=0.3.0.1:215:16 Sys.EventHandlerList.prototype.getHandler/<@http://localhost:60103/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ctl00_ctl00_ctl00_ctl00_ContentBody_ContentMain_RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+Telerik.Web.UI%2c+Version%3d2013.3.1114.40%2c+:6:51366
Do you have any idea what can be wrong?
Thank you,
Petr
​