Create AutoCompleteBox from Javascript

2 posts, 0 answers
  1. Mickael
    Mickael avatar
    57 posts
    Member since:
    Oct 2014

    Posted 16 Sep 2015 Link to this post


    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=,+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...


  2. Plamen
    Plamen avatar
    2723 posts

    Posted 21 Sep 2015 Link to this post


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

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top