Override 'x' clear button behavior on a text box

6 posts, 0 answers
  1. Shahram
    Shahram avatar
    3 posts
    Member since:
    Mar 2014

    Posted 06 May 2014 Link to this post

    Hi 

    How can I override the clear button ('x') behavior on a text box of a filter template? Is it possible to clear the filter content by clicking on the 'x' button on a grid column? 
  2. Iva Koevska
    Admin
    Iva Koevska avatar
    286 posts

    Posted 09 May 2014 Link to this post

    Hi Shahram,

    Thanks for reaching out.

    Unfortunately, neither the provided information, nor the selected product are sufficient for us to determine what assistance you might need.

    Would you mind specifying the exact product you need assistance with? Thanks!

    Regards,
    Iva Koevska
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Shahram
    Shahram avatar
    3 posts
    Member since:
    Mar 2014

    Posted 09 May 2014 in reply to Iva Koevska Link to this post

    Hi Iva,

    My question is about one of the controls in Telerik UI for ASP.NET AJAX product . I have a telerik "RadGrid" on my .aspx page in which I have a "GridBoundColumnn" with  "AllowFiltering" enabled. When users type in the filter text box of that column, a small 'x' button appears on the right side of the text box. Clicking on that button only clears the content of the text box not the actual filter. Is there a way to override this 'x' button's behavior so that it clears the column filter?

    Regards
  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 14 May 2014 Link to this post

    Hello Shahram,

    The behavior that you are describing is a browser behavior not related to our controls. Please note that IE will add the small "x" button to all input elements, when they are focused. What this button does is to clear the content of the input element, but once again, this is a browser related behavior.

    I could suggest that you hide the clear button in IE also (since it is not available in any other browser). The following forum thread demonstrates how to achieve this:
    Hope that helps.


    Regards,
    Konstantin Dikov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  5. Shahram
    Shahram avatar
    3 posts
    Member since:
    Mar 2014

    Posted 14 May 2014 in reply to Konstantin Dikov Link to this post

    Hi Konstantin,

    Thanks for your respond. I followed instructions from the link you sent me and added the following rule to all elements on all of my pages:

    ::-ms-clear
    {
        display: none !important;
    }

    It worked for asp controls but not for elements in my RadGrid.  It seems that this rules gets ignored for elements in a RadGrid somehow. And I also noticed that 'x' clear button doesn't show up for some textboxes regardless of applying this css rule (in  IE 11).

    Thank you 



  6. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    1800 posts

    Posted 15 May 2014 Link to this post

    Hello Shahram,

    I have tested locally such scenario and the "x" clear button is not visible on any input element. For your convenience I am attaching the sample I have tested on my end.

    Please note that if you are running your page in IE with different Document or Browser mode, the style change will not be applied. Some information on this is available at the following forum thread:
    Once again, please have in mind that this is a IE behavior, not related to our controls in any way.


    Regards,
    Konstantin Dikov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top