You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Templates in the ComboBox for Blazor.
5
5
slug: components/combobox/templates
6
6
tags: telerik,blazor,combo,combobox,templates
7
7
published: True
8
8
position: 25
9
9
---
10
10
11
-
# ComboBox Templates
11
+
# MultiColumnComboBox Templates
12
12
13
-
The ComboBox component allows you to change what is rendered in its items, header and footer through templates.
13
+
The MultiColumnComboBox component allows you to change what is rendered in its header and footer through templates.
14
14
15
15
List of the available templates:
16
16
17
-
*[Item Template](#item-template)
18
-
*[Header](#header)
19
-
*[Footer](#footer)
20
-
21
-
22
-
## Item Template
23
-
24
-
The Item template determines how the individual items are rendered in the dropdown element of the component. By default, the text from the model is rendered.
25
-
26
-
>caption Item Template Example
27
-
28
-
````CSHTML
29
-
@* Define what renders for the items in the dropdown *@
30
-
31
-
<TelerikComboBox @bind-Value=@SelectedValue
32
-
Data="@ComboBoxData"
33
-
ValueField="ProductId"
34
-
TextField="ProductName">
35
-
<ItemTemplate>
36
-
<strong>@((context as Product).ProductName) - @(String.Format("{0:C2}", (context as Product).UnitPrice))</strong>
37
-
</ItemTemplate>
38
-
</TelerikComboBox>
39
-
40
-
@code {
41
-
public IEnumerable<Product> ComboBoxData { get; set; }
|[`Header`](#header)| Controls the rendering of the element above the list of items in the dropdown. |
26
+
|[`Footer`](#footer)| Controls the rendering of the element below the list of items in the dropdown. |
73
27
74
28
## Header
75
29
76
-
The header is content that you can place above the list of items inside the dropdown element. It is always visible when the combobox is expanded. By default it is empty.
30
+
The header is content that you can place above the list of items inside the dropdown element. It is always visible when the MultiColumnComboBox is expanded. By default it is empty.
The footer is content that you can place below the list of items inside the dropdownlist element. It is always visible when the dropdown is expanded. By default it is empty.
@@ -132,51 +73,38 @@ The footer is content that you can place below the list of items inside the drop
0 commit comments