Hi, I'm wondering if there's any way to implement TelerikForm in the Template in TelerikListView? Here's my code below, I have a TelerikListView and I wish to place TelerikForm in its Template without the columns, I only want the feature of form to submit my delete action, after submitting the form, it'll trigger Delete_Click then call another component Confirm, which is a customized confirmation block to avoid deleting without confirmation. However, the context.UserName always showed the last data of context, I tried several times and found out the TelerikListView looped over without entering TelerikForm, is that a feature of TelerikListView or did I do something wrong? Please help me out, thank you in advance.
01.
<
TelerikListView
Data
=
"@Users"
Width
=
"800px"
Pageable
=
"true"
>
02.
<
HeaderTemplate
>
03.
<
h2
>Users List</
h2
>
04.
</
HeaderTemplate
>
05.
<
Template
Context
=
"context"
>
06.
<
div
class
=
"listview-item"
>
07.
<
h4
>User Id: @context.Id</
h4
>
08.
<
h4
>User Email: @context.Email</
h4
>
09.
</
div
>
10.
<
TelerikForm
Model
=
"context"
OnValidSubmit
=
"Delete_Click"
>
11.
<
FormValidation
>
12.
<
DataAnnotationsValidator
></
DataAnnotationsValidator
>
13.
</
FormValidation
>
14.
<
FormItems
>
15.
<
FormItem
>
16.
<
Template
>
17.
</
Template
>
18.
</
FormItem
>
19.
</
FormItems
>
20.
<
FormButtons
>
21.
<
TelerikButton
class
=
"btn btn-danger"
ButtonType
=
"ButtonType.Submit"
>
22.
Delete
23.
</
TelerikButton
>
24.
</
FormButtons
>
25.
</
TelerikForm
>
26.
<
Confirm
@
ref
=
"DeleteConfirmation"
ConfirmationChanged
=
"ConfirmationDelete_Click"
27.
ConfirmationMessage=@($"Are you sure you want to delete \"{context.UserName}\"?")></
Confirm
>
28.
</
Template
>
29.
</
TelerikListView
>