Custom template with two header templates

4 posts, 0 answers
  1. Raja
    Raja avatar
    43 posts
    Member since:
    Oct 2013

    Posted 05 Mar 2015 Link to this post

    I am using AutoComplete where users can search for different type of data in one field like search in gmail or IMDB. In my case I would like to search for employees and departments. If the keyword matches both I have to display all the results. Below is the example format I want to display.

    Emp Id   Name
    123        test
    124        test 1

    Dept Id   Dept Name
    123         Dept1
    124         dept 2

    how can I use two header templates?
  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 09 Mar 2015 Link to this post

    Hello Raja,

    In general, the widget supports single header template. If you would like to display different contents based on some logic, then you will to append the header template manually. Here is a Dojo demo (http://dojo.telerik.com/@ggkrustev/uxAjI) that demonstrates one possible approach.

    Let me know if something is not clear.

    Regards,
    Georgi Krustev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Raja
    Raja avatar
    43 posts
    Member since:
    Oct 2013

    Posted 16 Mar 2015 in reply to Georgi Krustev Link to this post

    Thank you and sorry of not responding early.
    In my case I have to display both headers at same time. It is like two sections. Top section contains Employees and bottom section contains departments.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 18 Mar 2015 Link to this post

    Hello Raja,

    In that case, I would suggest you use the headerTemplate option to display a template on top and the footer should be added manually. Here is a modified demo that shows one possible approach.

    Regards,
    Georgi Krustev
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
UI for ASP.NET MVC is VS 2017 Ready