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

Adding Custom Token Remove Image

2 Answers 79 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 05 Mar 2013, 08:05 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 05 Mar 2013, 08:50 AM
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.
0
Henry
Top achievements
Rank 1
answered on 05 Mar 2013, 02:29 PM
Thanks Shinu. The AutoCompleteBox in your attachment is exactly what I needed.
Tags
AutoCompleteBox
Asked by
Henry
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Henry
Top achievements
Rank 1
Share this question
or