Autocomplete groupable?

6 posts, 0 answers
  1. J
    J avatar
    4 posts
    Member since:
    Jan 2014

    Posted 04 Feb 2014 Link to this post

    anyone know if the autocomplete control is capable of grouping?
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 06 Feb 2014 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. J
    J avatar
    4 posts
    Member since:
    Jan 2014

    Posted 06 Feb 2014 Link to this post

    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>

  5. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 07 Feb 2014 Link to this post

    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!
  6. J
    J avatar
    4 posts
    Member since:
    Jan 2014

    Posted 07 Feb 2014 Link to this post

    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?
  7. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 11 Feb 2014 Link to this post

    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!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready