Adding Custom Token Remove Image

3 posts, 1 answers
  1. Henry
    Henry avatar
    44 posts
    Member since:
    Feb 2013

    Posted 05 Mar 2013 Link to this post

    Hi,

    Please let me know whether it is possible to replace the token remove image(X) with a custom one. To make it more clear when we add a item token into AutoCompleteBox, there is a cross symbol to remove it from the AutoCompleteBox. I want to add a custom image instead of the native x button.

    Thanks,
    Henry.
  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 05 Mar 2013 Link to this post

    Hello Henry,

    Yes, it is possible to add a custom image. Try overriding the default CSS as follows. Depending upon the image size, you may set the background-position in the CSS and it is preferable to add a tiny image.

    CSS:
    <style type="text/css">
            .RadAutoCompleteBox_Default .racRemoveTokenLink
            {
                background-image: url("../Images/Close.png") !important;
                background-position: 1px 2px !important;
            }
    </style>

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Henry
    Henry avatar
    44 posts
    Member since:
    Feb 2013

    Posted 05 Mar 2013 Link to this post

    Thanks Shinu. The AutoCompleteBox in your attachment is exactly what I needed.
Back to Top