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

Custom template with two header templates

3 Answers 93 Views
AutoComplete
This is a migrated thread and some comments may be shown as answers.
Raja
Top achievements
Rank 1
Raja asked on 05 Mar 2015, 07:47 PM
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?

3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 09 Mar 2015, 11:46 AM
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.

 
0
Raja
Top achievements
Rank 1
answered on 16 Mar 2015, 11:12 PM
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.
0
Georgi Krustev
Telerik team
answered on 18 Mar 2015, 05:02 PM
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.

 
Tags
AutoComplete
Asked by
Raja
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Raja
Top achievements
Rank 1
Share this question
or