Insert new item without selecting this new item

2 posts, 0 answers
  1. Eric
    Eric avatar
    4 posts
    Member since:
    Dec 2011

    Posted 30 Apr 2013 Link to this post

    Since last update of my control, If i insert intem in javascript, new item is selected. I don't want this. This is my code, in older version, this code work well

     

     

    function AddCouncillorToProposedByCombobox(id, councillorName, row) {

     var rcbProposedBy = row.findControl('rcbProposedBy');

     if (rcbProposedBy != null) {
     

     var comboItems = rcbProposedBy.get_items();

     var idx = comboItems.get_count();

     for (var j = 0; j < comboItems.get_count(); j++) {

     var comboItem = comboItems.getItem(j);

     if (comboItem.get_text() > councillorName) {

    idx = j;

     break;

    }

    }

    var comboItem = new Telerik.Web.UI.RadComboBoxItem();

    comboItem.set_text(councillorName);

    comboItem.set_value(id);

    comboItems.insert(idx, comboItem);

    }

    }

  2. Plamen
    Admin
    Plamen avatar
    2969 posts

    Posted 06 May 2013 Link to this post

    Hi Eric,

     
    I have tested the issue you describes but the new inserted item was not selected in any of the versions I have tried . Here attached is my sample test web page. Please review it and let me know if with which exactly version it is not working properly.

    Greetings,
    Plamen
    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