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

Insert new item without selecting this new item

1 Answer 14 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 30 Apr 2013, 05:22 PM
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);

}

}

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 06 May 2013, 07:14 AM
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.
Tags
ComboBox
Asked by
Eric
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or