RadComboBox Filter not work with 0

3 posts, 0 answers
  1. Clyde
    Clyde avatar
    2 posts
    Member since:
    Apr 2013

    Posted 09 Apr 2013 Link to this post

    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. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 12 Apr 2013 Link to this post

    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.
  3. Clyde
    Clyde avatar
    2 posts
    Member since:
    Apr 2013

    Posted 17 Apr 2013 Link to this post

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