Skip to content

Commit dc8628c

Browse files
ntachevanikolay-nenkov
authored andcommitted
chore(treelist): fix snippets
1 parent 0ac3110 commit dc8628c

File tree

5 files changed

+26
-27
lines changed

5 files changed

+26
-27
lines changed

components/treelist/columns/command.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ There are four built-in commands:
5656

5757
The command column provides access to the data item via `context`. This may be useful for conditional statements or passing parameters to custom business logic.
5858

59+
<div class="skip-repl"></div>
5960
```razor
6061
<TreeListCommandColumn>
6162
@{

components/treelist/editing/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@ There are a few considerations to keep in mind with the CUD operations of the tr
641641

642642
* When an input receives an `EditContext` (usually comes down as a cascading parameter), the framework also requires a `ValueExpression`. If you use two-way binding (the `@bind-Value` syntax), the `ValueExpression` is deducted from there. However, if you use only the `Value` property, you have to pass the `ValueExpression` yourself. This is a lambda expression that tells the framework what field in the model to update. The following sample demonstrates how to achieve that. You can also check the [Requires a value for ValueExpression]({%slug common-kb-requires-valueexpression%}) knowledge base article for more details.
643643

644+
<div class="skip-repl"></div>
644645
````CSHTML
645646
<EditorTemplate>
646647
<TelerikTextBox Value="@myModel.MyField"

components/treelist/events.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,8 +1203,6 @@ The `OnRowContextMenu` event handler receives a `TreeListRowClickEventArgs` argu
12031203
var clickedRow = args.Item as Employee;
12041204
12051205
logger = $"OnRowContextMenu event fired from right clicking on {clickedRow.Name}";
1206-
1207-
@[template](/_contentTemplates/common/click-events.md#rowclick-args-example)
12081206
}
12091207
12101208
public List<Employee> Data { get; set; }

components/treelist/selection/rows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ To enable row selection:
3131
>caption TreeList multiple row selection
3232
3333
````CSHTML
34-
<<TelerikTreeList Data="@TreeListData"
34+
<TelerikTreeList Data="@TreeListData"
3535
IdField="@nameof(Employee.Id)"
3636
ParentIdField="@nameof(Employee.ParentId)"
3737
SelectionMode="@TreeListSelectionMode.Multiple"

components/treelist/templates/filter.md

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -57,29 +57,29 @@ For example, try filtering with a Min value of 50+ to leave only root-level item
5757
<TreeListColumns>
5858
<TreeListColumn Field="Name" Expandable="true" Width="320px" Filterable="false" />
5959
<TreeListColumn Field="Id" Filterable="false" Width="100px" />
60-
<TreeListColumn Field="Age" Width="350px">
61-
<FilterCellTemplate>
62-
@{
63-
// we store a reference to the filter context to use in the business logic
64-
// you can also use it inline in the template, like with the Clear button below
65-
theFilterContext = context;
66-
}
67-
68-
<label for="min">Min:&nbsp;</label>
69-
<TelerikNumericTextBox Id="min"
70-
@bind-Value="@MinValue"
71-
OnChange="@SetupFilterRule">
72-
</TelerikNumericTextBox>
73-
<label for="min">Max:&nbsp;</label>
74-
<TelerikNumericTextBox Id="max"
75-
@bind-Value="@MaxValue"
76-
OnChange="@SetupFilterRule">
77-
</TelerikNumericTextBox>
78-
<TelerikButton ButtonType="ButtonType.Button"
79-
Class="k-clear-button-visible ml-2"
80-
Icon="@SvgIcon.FilterClear"
81-
Enabled="@( MinValue != null || MaxValue != null )"
82-
OnClick="@(async () =>
60+
<TreeListColumn Field="Age" Width="350px">
61+
<FilterCellTemplate>
62+
@{
63+
// we store a reference to the filter context to use in the business logic
64+
// you can also use it inline in the template, like with the Clear button below
65+
AgeFilterContext = context;
66+
}
67+
68+
<label for="min">Min:&nbsp;</label>
69+
<TelerikNumericTextBox Id="min"
70+
@bind-Value="@MinValue"
71+
OnChange="@SetupFilterRule">
72+
</TelerikNumericTextBox>
73+
<label for="min">Max:&nbsp;</label>
74+
<TelerikNumericTextBox Id="max"
75+
@bind-Value="@MaxValue"
76+
OnChange="@SetupFilterRule">
77+
</TelerikNumericTextBox>
78+
<TelerikButton ButtonType="ButtonType.Button"
79+
Class="k-clear-button-visible ml-2"
80+
Icon="@SvgIcon.FilterClear"
81+
Enabled="@( MinValue != null || MaxValue != null )"
82+
OnClick="@(async () =>
8383
{
8484
MinValue = MaxValue = null;
8585
@@ -181,7 +181,6 @@ For example, try filtering with a Min value of 50+ to leave only root-level item
181181
margin: unset;
182182
}
183183
</style>
184-
185184
````
186185

187186
## Filter Menu Template

0 commit comments

Comments
 (0)