Javascript error for autocomplete functionality of RadComboBox

3 posts, 0 answers
  1. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 09 Nov 2012 Link to this post

    HI,

    I have to implement Autocomplete functionality on RadComboBox, functionality is working fine. But on page load, I am facing Javascript error. Like ‘Telerik.Webcontrols.RadComboBox’ is null or not an object.

    I am currently using IE7 with VS2008. And Version 2010.3.1317.35 of Telerik.Web.UI.dll file.

     

    RadComboBox Declaration:
    <RadCmbBox:RadComboBox HighlightTemplatedItems="true" ID="radComboSelectBaseModule"

    Skin="WindowsXP_IT" Height="100px" Width="200px" runat="server" SkinsPath="~/RadControls/Combobox/Skins"

    AllowCustomText="true" MarkFirstMatch="true" AutoPostBack="true" Enabled="true"

    Visible="true" TabIndex="1" OnSelectedIndexChanged="radComboSelectBaseModule_SelectedIndexChanged"

    enableitemcaching="True" enableloadondemand="True" onitemsrequested="radComboSelectBaseModule_ItemsRequested" >

     Javascript added for functionality:

    <script type="text/javascript">

       

        var prototype = Telerik.WebControls.RadComboBox.prototype;

        var set_text = prototype.set_text;

        var propertyChange = prototype._onInputPropertyChange;

     

        prototype.set_text = function (value) {

            this._skipEvent = 0;

            set_text.call(this, value);

        };

     

        prototype._onInputPropertyChange = function () {

            if (!event.propertyName)

                event = event.rawEvent;

            if (event.propertyName == "value") {

                this._skipEvent++;

                if (this._skipEvent == 2)

                    return;

                propertyChange.call(this);

            }

        };

        </script>

    Please suggest if there is any other way to complete this functionality with version 2010.3.1317.35.

    Thanks.

  2. Manishkumar
    Manishkumar avatar
    240 posts
    Member since:
    Feb 2009

    Posted 07 Dec 2012 Link to this post

    Hi,

    Can you please respond back with your suggestions ?

    Thanks and regards ,
    Manishkumar Patel
  3. Nencho
    Admin
    Nencho avatar
    1864 posts

    Posted 12 Dec 2012 Link to this post

    Hi Manishkumar,

    Could you clarify about the version of the controls that you use - is it for asp.net ajax or classic asp.net. In addition, if you use the ajax , you should access the prototype of the ComboBox in the following manner:

    var prototype = Telerik.Web.UI.RadComboBox.prototype;


    Kind regards,
    Nencho
    the Telerik team
    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 their blog feed now.
Back to Top