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

RadListBox insertItem

3 Answers 85 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Dave Hollen
Top achievements
Rank 1
Dave Hollen asked on 11 Mar 2010, 11:16 PM
Hello,

I am trying to user the insertItem function (in Javascript) for the RadListBox. 

Here is my code:

var

 

listBox = $find("<%= rlbSelectedContacts.ClientID %>");

 

 

var arr = [];

 

 

for (var i = 0; i < 10; i++) {

 

 

var item = new Telerik.Web.UI.RadListBoxItem();

 

item.set_text(

"text" + i);

 

arr[i] = item;

}

listBox.insertItems(arr);




When I run this script, it is telling me that "Microsoft JScript runtime error: Object doesn't support this property or method" regarding the insertItems() function.  listBox is not NULL in my script.  Any ideas?

I need to insert 2000+ items into the list box and a bulk insert would do wonders.

Thanks!
Dave

3 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 12 Mar 2010, 10:11 AM
Hello Dave,

I've tested this code and it worked without a problem at our side. Which version of the controls you're using?

All the best,
Yana
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Dave Hollen
Top achievements
Rank 1
answered on 12 Mar 2010, 03:12 PM
Q2 2009 Release.
0
Yana
Telerik team
answered on 15 Mar 2010, 01:11 PM
Hello Dave,

The method is available since 2009.2.826 version (Q2 service pack), so please upgrade in order to use it.

Regards,
Yana
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
ListBox
Asked by
Dave Hollen
Top achievements
Rank 1
Answers by
Yana
Telerik team
Dave Hollen
Top achievements
Rank 1
Share this question
or