Mark Matches - Can't search for parentheses

3 posts, 1 answers
  1. FTDEV129
    FTDEV129 avatar
    2 posts
    Member since:
    Mar 2016

    Posted 18 Mar Link to this post

    I am unable to find matching items that contain parentheses. I can successfully search for other special characters like '#', '%', '|', '*', etc. but not '('. In fact, it seems that typing '(' will clear the mask.

    How do I go about searching for an item that contains parentheses?

     

     

    OS: Windows 7
    exact browser version: Google Chrome 49.0.2623.87
    exact version of the Telerik product: 2013.3.1015.45
    preferred programming language: C#

     

  2. Answer
    Plamen
    Admin
    Plamen avatar
    2729 posts

    Posted 23 Mar Link to this post

    Hi,

    Thank you for reporting the issue and for your concern with the controls.

    The issue seems to be a bug in the control that is caused by the fact that "(" and down arrow are both generating the keycode 40 and we are preventing the markMatch when the down key is pressed. 

    I have logged the issue for fixing and you can follow its status and vote for it here.

    As a temporary workaround you can use the code below:
    <script>
                 var $T = Telerik.Web.UI;
                 var $LM = Telerik.Web.UI.RadListBox.Modules;
                 $LM.MarkMatch.prototype.onKeyPress= function(e) {
                     var listBox = this._rlb;
                     var selectionModeReset = false;
     
                     var code = e.charCode || e.keyCode;
                      
                     if (code < 32 && code != Sys.UI.Key.backspace && code != Sys.UI.Key.esc)
                         return true;
     
                     if(code == Sys.UI.Key.backspace)
                         e.preventDefault();
     
                     if ((code == Sys.UI.Key.esc || code == Sys.UI.Key.down || code == Sys.UI.Key.up) && !e.shiftKey) {
                         this._resetItems(this._items, true);
                         return false;
                     }
                    
                     if (listBox.get_selectionMode() == $T.ListBoxSelectionMode.Multiple) {
                         listBox.set_selectionMode($T.ListBoxSelectionMode.Single);
                         selectionModeReset = true;
                     }
                     
                     if (listBox._enableMarkMatches)
                         this._handleMarkMatches(code);
                     else
                         this._handleMarkFirstMatch(code);
     
                     // If the selection mode was Multiple before the event handling - set it back
                     if (selectionModeReset)
                         listBox.set_selectionMode($T.ListBoxSelectionMode.Multiple);
     
                     return true;
                 }
          </script>

    Hope this information will explain  the issue and be helpful.

    Regards,
    Plamen
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. FTDEV129
    FTDEV129 avatar
    2 posts
    Member since:
    Mar 2016

    Posted 23 Mar in reply to Plamen Link to this post

    This information explained the issue and the workaround worked. Thanks Plamen!
Back to Top