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

RadComboBox Filter not work with 0

2 Answers 111 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Clyde
Top achievements
Rank 1
Clyde asked on 09 Apr 2013, 04:05 PM
Hi Guys!
I have a big problem and i need some body help.
I have a radComboBox load with a concatenated string.
the filter doesn't work within i type a not number 0. i'm waiting some reply to solve my problem. thank's a lot.
protected void loadComboBox() 
{
    try 
    {
        Random rdCombo = new Random();
        this.ComboTest.Items.Clear();
        this.ComboTest.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("", ""));
        for(int i = 0; i < 120; i++)
        {
            this.ComboTest.Items.Insert((i + 1), new Telerik.Web.UI.RadComboBoxItem("000" + rdCombo.Next(120) + " - " + "Descrizione " + (i + 1), Convert.ToString((i + 1))));
        }
        this.ComboTest.Filter = Telerik.Web.UI.RadComboBoxFilter.Contains;
        this.ComboTest.Sort = Telerik.Web.UI.RadComboBoxSort.Ascending;
    }
    catch(Exception ex)
    {
        throw ex;
    }
}

2 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 12 Apr 2013, 01:39 PM
Hi Clyde,

This is a development issue which is reproducible only in Internet Explorer. It has been resolved in the latest Service Pack. To resolve it you will have to update your project to the latest version. Or you may try to add the following java script which actually is the fix:
<script type="text/javascript">
    Telerik.Web.UI.RadComboBox.prototype._isCommandKey = function (keyCode) {
        for (var name in Telerik.Web.UI.Keys) {
            if (name != "Numpad0" && name != "Numpad9" && name != "Zero" && name != "Del") {
                if (keyCode == Telerik.Web.UI.Keys[name])
                    return true;
            }
        }
        return false;
    }
</script>


All the best,
Hristo Valyavicharski
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.
0
Clyde
Top achievements
Rank 1
answered on 17 Apr 2013, 09:56 AM
Hi Hristo!

Thank's a lot. i've tried to do like you said and resolved my issue.
i've just update my project to the lasted version of Telerik and every things work perfectly.

Thank's.
All the best!!
Tags
ComboBox
Asked by
Clyde
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Clyde
Top achievements
Rank 1
Share this question
or