OnItemsRequested event binds empty value in RadCombo.

2 posts, 0 answers
  1. John
    John avatar
    18 posts
    Member since:
    Jul 2009

    Posted 26 Jul 2010 Link to this post

     <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






  2. Kalina
    Admin
    Kalina avatar
    918 posts

    Posted 29 Jul 2010 Link to this post

    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
Back to Top