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

Create AutoCompleteBox from Javascript

1 Answer 48 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Mickael
Top achievements
Rank 1
Mickael asked on 16 Sep 2015, 03:51 PM

Hi,

I am trying to create a variable number of autocompletebox from JavaScript.

I found some code on your forum about how to do it with a RadSlider and tried to adapt it.

Unfortunatly that failed...

This is what I did:

var id = 'multiHolder_' + nameIndex;
var boxProps = {
    _id : id,
    Enabled : "false",
    EmptyMessage : "",
    AllowCustomEntry : "false",
    InputType: "Token",
    _skin: "Default",
    _width: "475px"
}
var boxEvents = {}; // No events
$create(Telerik.Web.UI.RadAutoCompleteBox, boxProps, boxEvents, null, holdingCell);

When the javascript runs I get the following error:

 

Unhandled exception at line 4278, column 1 in http://localhost:60713/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:47de63c8-89d4-489c-bfde-4185a11627a3:ea597d4b:b25378d2;Telerik.Web.UI,+Version=2015.1.401.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:4f93cdea-660e-49e9-b57d-168c603f1b46:16e4e7cd:f7645509:24ee1bba:6d43f6d9:874f8ea2:c128760b:88144a7a:1e771326:f9b9258:78b9daca
 
0x800a138f - JavaScript runtime error: Unable to get property 'children' of undefined or null reference

This is a really urgent matter for us.

We would really prefer to be able to create the AutoCompleteBox dynamically rather than having a bunch of predefined one that we show/hide on the fly...

 

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 21 Sep 2015, 05:09 AM
Hi,

Unfortunately the desired scenario is not supported by RadAutoCompleteBox. You may consider using Kendo Autocomplete instead.

Regards,
Plamen
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
AutoCompleteBox
Asked by
Mickael
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or