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

OnItemsRequested event binds empty value in RadCombo.

1 Answer 55 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 26 Jul 2010, 11:39 AM
 <telerik:RadComboBox ID="radComboCustomer" Skin="Sunset" runat="server" Width="50%"
  CssClass="ComboBox"   EnableLoadOnDemand="true"
   OnItemsRequested="radComboCustomer_ItemsRequested" ShowMoreResultsBox="true"
   EnableVirtualScrolling="true">
  </telerik:RadComboBox>



 protected void radComboCustomer_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {

 for (int i = 0; i < 10; i++)
        {           
            radComboCustomer.Items.Add(new RadComboBoxItem( "Repeat Text","11"));
        }
}


On combo focus first time it shows all 10 records with same text named as  " Repeat Text ".
Now when i am writing any letter like "S" then according to logic the all 10 same records should get display
but its showing empty records .And on lost focus combo gets close automatically and again when i am focusiing with 
exsisting letter s in combo then its showing 10 records .
So i think the record get added to combo but cant see so need to close and open combo for this .
So plese have some practical demo and let me know the problem.

Mine DDL versino is 2009.3.1503.35

Thanks






1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 29 Jul 2010, 11:03 AM
Hello John,

I used the code snippets provided to create a test page.

There are two changes that I made at OnItemsRequested event handler - at first I cleared the Items collection of the RadComboBox, and then I changed the items generation logic.
Please note that the values of RadComboBox items have to be unique.
protected void radComboCustomer_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
    radComboCustomer.Items.Clear();
    for (int i = 0; i < 10; i++)
    {
        radComboCustomer.Items.Add(new RadComboBoxItem("Repeat Text", i.ToString()));
    }
}

After tests performed I can say that RadComboBox control behaves correctly on my side - please take a look at this demonstration video.
Let me suggest you find the sample page attached and give it a try with our latest version (Telerik.Web.UI 2010.2.713).

All the best,
Kalina
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
ComboBox
Asked by
John
Top achievements
Rank 1
Answers by
Kalina
Telerik team
Share this question
or