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

Autocomplete groupable?

5 Answers 47 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
J
Top achievements
Rank 1
J asked on 04 Feb 2014, 04:56 PM
anyone know if the autocomplete control is capable of grouping?

5 Answers, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 06 Feb 2014, 11:50 AM
Hello J,

I am afraid that the AutoComplete does not support any grouping behavior. I am sorry for any inconvenience caused.

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
J
Top achievements
Rank 1
answered on 06 Feb 2014, 05:22 PM
Thanks for replying.  I'm going to attempt to generate my grouping manually via templates.  Do you know off hand how to reference a template as a variable so I can have a cleaner template property? I'm not sure how to go about doing this. e.g.

.Template("itemTemplate") 
...

<script id="itemTemplate" type="text/x-kendo-template">
    <div class="header">#: data.ModuleName#</div>
</script>

0
Petur Subev
Telerik team
answered on 07 Feb 2014, 06:28 AM
Hello J,

Basically everything covered here could be applied the same way to the template of the AutoComplete. Also you can invoke function like so:

Template("#= myTemplateHandler(data)#")
 
 
<script>
    function myTemplateHandler(customer){
            return "some template" + customer.FristName;
     }
<script>


Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
J
Top achievements
Rank 1
answered on 07 Feb 2014, 05:52 PM
Thank You Petur!  One more question if you don't mind, is there a way to change the background color of the dropdown?  It appears gray.  I can change the template background, but it seems there's still a boarder of the dropdown that's gray... Maybe there's a way to fully fill the dropdown control with a template?
0
Petur Subev
Telerik team
answered on 11 Feb 2014, 03:37 PM
Hello JP,

Basically you can change the DropDownList CSS with JavaScript like demonstrated in this JsBin:

http://jsbin.com/abisod/24/edit

Kind Regards,
Petur Subev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
AutoComplete
Asked by
J
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
J
Top achievements
Rank 1
Share this question
or