This is a migrated thread and some comments may be shown as answers.

Ajaxified combobox: unsupported method "toUpperCase"

2 Answers 59 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Bernd
Top achievements
Rank 2
Bernd asked on 19 Aug 2013, 01:21 PM
Hello all.

I try to ajaxify a combobox with automatic load on demand.

The definition in the AJAX manager:
<telerik:AjaxSetting AjaxControlID="MatCompAddComponentButton">
  <UpdatedControls>
    <telerik:AjaxUpdatedControl ControlID="PanelMatComp" UpdatePanelCssClass="" />
  </UpdatedControls>
</telerik:AjaxSetting>

The PanelMatComp:
<asp:Panel ID="PanelMatComp" runat="server" Visible="false">
    <telerik:OpenAccessDataSource ID="OpenAccessDataSourceItems" runat="server" ObjectContextProvider="idee5.DispatcherModel.DispatcherEntities, idee5.DispatcherModel" TypeName="idee5.DispatcherModel.Item" Where="this.MasterSystemHierarchy == @MasterSystemHierarchy">
        <WhereParameters>
            <asp:QueryStringParameter Name="MasterSystemHierarchy" QueryStringField="Hierarchy" />
        </WhereParameters>
    </telerik:OpenAccessDataSource>
    <asp:CheckBox ID="MatCompComplete" runat="server" Enabled="False" Text="Komplettentnahme" />
    <telerik:RadComboBox ID="MatCompItemComboBox" Runat="server" Culture="de-DE" DataSourceID="OpenAccessDataSourceItems" DataTextField="Label" DataValueField="Id" EmptyMessage="Bitte Artikel auswählen" EnableAutomaticLoadOnDemand="True" ItemsPerRequest="10" Label="Artikel" LoadingMessage="Lade..." AutoPostBack="True" ShowMoreResultsBox="True" EnableVirtualScrolling="True" Filter="Contains" Height="180px" Width="250px" CausesValidation="False" EnableItemCaching="True">
    </telerik:RadComboBox>
...
</asp:Panel>

Reaching the point where the panel is shown I get the following error message. Disabling AJAX in the Rad AJAX manager works fine.
"Das Objekt unterstützt die Eigenschaft oder Methode "toUpperCase" nicht"

It seems to be the first call of registerEnum. But I have no idea what is wrong. All other controls work fine.
a.RadComboBoxItemDataBoundEventArgs.registerClass("Telerik.Web.UI.RadComboBoxItemDataBoundEventArgs",a.RadComboBoxItemEventArgs);
})();
(function(){var a=$telerik.$;
var b=Telerik.Web.UI;
a.registerEnum(b,"Keys",{Tab:9,Enter:13,Shift:16,Escape:27,Space:32,PageUp:33,PageDown:34,End:35,Home:36,Left:37,Up:38,Right:39,Down:40,Insert:45,Del:46,Zero:48,Numpad0:96,Numpad9:105,F1:112,F12:123,Delete:127});
a.registerEnum(b,"RadComboBoxFilter",{None:0,Contains:1,StartsWith:2});
a.registerEnum(b,"RadComboBoxExpandDirection",{Up:1,Down:2});
a.registerEnum(b,"RadComboBoxCheckedItemsTexts",{FitInInput:0,DisplayAllInInput:1});
a.registerEnum(b,"RadComboBoxDropDownAutoWidth",{Disabled:0,Enabled:1});
})();
$telerik.findComboBox=$fi

Any help is appreciated
Bernd

2 Answers, 1 is accepted

Sort by
0
Bernd
Top achievements
Rank 2
answered on 19 Aug 2013, 03:58 PM
Here is the AJAX part about the combobox. Sorry for copying the wrong part in the original post.

<
telerik:AjaxSetting AjaxControlID="MatCompItemComboBox">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="MatCompItemComboBox" />
    </UpdatedControls>
</telerik:AjaxSetting>

0
Marin
Telerik team
answered on 22 Aug 2013, 07:14 AM
Hi,

 You can check whether all controls participating in the ajax settings are rendered and visible on the page when the ajax request starts. If you are trying to ajaxify a control that is not initially visible this might cause problems later on. Also you can test with a single simple setting in the AjaxManager e.g.:

<telerik:AjaxSetting AjaxControlID="PanelMatComp">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="PanelMatComp" />
    </UpdatedControls>
</telerik:AjaxSetting>

to rule out any possible problems issues between the various settings.
Additionally the load on the demand feature of the combo actually performs an asynchronous request itself so no regular postback should be raised by the combobox even without ajax settings.Regards,
Marin
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Ajax
Asked by
Bernd
Top achievements
Rank 2
Answers by
Bernd
Top achievements
Rank 2
Marin
Telerik team
Share this question
or