Skip to content

Commit 5ad9bd9

Browse files
docs(grid): update custom editor template wip
1 parent dfe08e6 commit 5ad9bd9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

components/grid/templates.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ position: 24
1010

1111
# Grid Templates
1212

13-
The Grid component can use templates for [rows](#row-template), [columns (cells)](#column-template) and [editing of a field](#edit-template).
13+
The Grid component can use templates for:
14+
* [columns (cells)](#column-template)
15+
* [rows](#row-template)
16+
* [editing of a field](#edit-template)
1417

1518
Like other Blazor content, they can receive a `context` argument that is the type of the model. To use templates, you must bind the grid to a named model.
1619

@@ -147,6 +150,7 @@ If you need to perform logic more complex than simple data binding, use the chan
147150
148151
````CSHTML
149152
@using Telerik.Blazor.Components.Grid
153+
@using Telerik.Blazor.Components.DropDownList
150154
151155
<TelerikGrid Data=@MyData EditMode="inline" Pageable="true" Height="500px">
152156
<TelerikGridColumns>
@@ -156,12 +160,7 @@ If you need to perform logic more complex than simple data binding, use the chan
156160
<EditorTemplate>
157161
@{
158162
CurrentlyEditedEmployee = context as SampleData;
159-
<select @bind="CurrentlyEditedEmployee.Role">
160-
@foreach (string item in Roles)
161-
{
162-
<option value=@item>@item</option>
163-
}
164-
</select>
163+
<TelerikDropDownList Data="@Roles" @bind-Value="CurrentlyEditedEmployee.Role"></TelerikDropDownList>
165164
}
166165
</EditorTemplate>
167166
</TelerikGridColumn>

0 commit comments

Comments
 (0)