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

Javascript error for autocomplete functionality of RadComboBox

2 Answers 64 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Manishkumar
Top achievements
Rank 1
Manishkumar asked on 09 Nov 2012, 12:08 PM

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 Answers, 1 is accepted

Sort by
0
Manishkumar
Top achievements
Rank 1
answered on 07 Dec 2012, 05:24 PM
Hi,

Can you please respond back with your suggestions ?

Thanks and regards ,
Manishkumar Patel
0
Nencho
Telerik team
answered on 12 Dec 2012, 03:23 PM
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.
Tags
ComboBox
Asked by
Manishkumar
Top achievements
Rank 1
Answers by
Manishkumar
Top achievements
Rank 1
Nencho
Telerik team
Share this question
or