RadComboBox selecteditem does not clear out

2 posts, 0 answers
  1. mabs
    mabs avatar
    57 posts
    Member since:
    May 2010

    Posted 25 Oct 2010 Link to this post

    I have a radcombobox with EnableAutomaticLoadOnDemand="true", when I select the combobox, all the data loads and I am able to select an item.  If I then click the same combobox, the value of the previous selection is present, therefore it will not load in any of the data untill i delete the text in the combobox.  Is there away around this?  I would like to the text to be cleared out so everytime a user clicks on the box it will load all the values in?

    I have set up the radcombobox in the folloaing way
    <telerik:RadComboBox ID="rcb_1" AllowCustomText="true" runat="server" EmptyMessage="Please select a value..." 
    DataTextField="description" DataValueField="ID" CssClass="radComboBox" AutoPostBack="true" MaxHeight="200px" width="170px"
    EnableAutomaticLoadOnDemand="true" Filter="Contains" ></telerik:RadComboBox>
    I bind the data in the following way,
    rcb_1.DataSource = Class.getData()
    rcb_1.DataBind()
    Any help would be much appreciated
  2. Yana
    Admin
    Yana avatar
    4916 posts

    Posted 28 Oct 2010 Link to this post

    Hi Russell Mabin,

    The reason for this behavior is the Filter property. In order to work-around it, please subscribe to OnClientDropDownOpening event of the combobox and add the following javascript function to your page:

    function dropDownOpening(sender, args) {
        if (sender.get_text() != "") {
            sender.set_text("");
            sender._filterText = "";
            sender.requestItems("");
        }    
    }

    please try it and let us know how it goes.

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