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

Highlight the keyword in suggest list

2 Answers 16 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Chamal
Top achievements
Rank 1
Veteran
Chamal asked on 17 Apr 2021, 06:10 PM
is possible to Highlight the keyword in the suggested list when the user typing?

2 Answers, 1 is accepted

Sort by
0
Accepted
Yanmario
Telerik team
answered on 20 Apr 2021, 02:17 PM

Hi Aruna,

Š¢hank you for the provided screenshot.

Currently, there isn't such a built-in feature that can be used out-of-the-box for the DropDowns. Instead, some solutions based on custom JavaScript logic should be implemented. You may check the following article extracted from StackOverflow suggesting such an approach:

https://stackoverflow.com/questions/8644428/how-to-highlight-text-using-javascript

Basically, what they suggest is to change the innerHTML of the elements that should support the highlighting functionality. Please check the following example with the AutoComplete:

https://stackblitz.com/edit/angular-fc14xj?file=app/app.component.ts

A similar approach can be achieved with the rest of the Kendo DropDowns components.

I would like to add that the suggested approach isn't based on a built-in or supported feature of Kendo UI for Angular and thus it should be used at the developer's own discretion.

Regards,
Yanmario Menev
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Chamal
Top achievements
Rank 1
Veteran
answered on 21 Apr 2021, 02:23 PM
Thank you for you answer.
Tags
DropDownList
Asked by
Chamal
Top achievements
Rank 1
Veteran
Answers by
Yanmario
Telerik team
Chamal
Top achievements
Rank 1
Veteran
Share this question
or