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

Tooltip and click-event on token

1 Answer 85 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Thomas
Top achievements
Rank 1
Thomas asked on 22 Feb 2013, 10:28 AM
Hi!

Have af few questions about the possibilities in the AutoCompleteBox:

1. Is it possible to get a tooltip to appear with mouse over on an token, with information about the token chosen?
2. Is it possible to be able to clik a token to get more info on that token?

I have not been able to find documentation about this on your site, that is why I'm asking this question in the forum.

/Thomas

1 Answer, 1 is accepted

Sort by
0
Bozhidar
Telerik team
answered on 26 Feb 2013, 12:52 PM
Hello Thomas,

You can easily add a tooltip to the tokens using the OnClientEntryAdded event. Here's some sample code:
function OnClientEntryAdded(sender, args) {
    args.get_entry().get_token().title = args.get_entry().get_text();
}

You can also handle the clicki event over a token with some jQuery:
function OnClientLoad(sender) {
    $telerik.$(sender.get_element())
        .on("click", ".racToken", function(e) {
            var entry = $telerik.$(e.target).data().entry;
            // Get more info about the token
        });
}

 

All the best,
Bozhidar
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.
Tags
AutoCompleteBox
Asked by
Thomas
Top achievements
Rank 1
Answers by
Bozhidar
Telerik team
Share this question
or