Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146385 | Aug 2,2019 04:15 AM UTC | Aug 21,2019 11:40 AM UTC | Blazor | 10 |
![]() |
Tags: In-place Editor |
Index.razor
<EjsInPlaceEditor Mode="@mode"
EditableOn="@editableOn"
Type="@InputType.Numeric"
ShowButtons="@showButtons"
Disabled="@disabled"
Value="@item.SellQuantity"
SubmitOnEnter="false"
Model="@numericModel"
OnActionSuccess="@OnSuccess"> // Event binding
</EjsInPlaceEditor>
@code {
public void OnSuccess(ActionEventArgs args) // Event for getting the submitted value
{
this.result = args.Value; // Current modified value
}
}
|
<EjsInPlaceEditor Mode="@mode"
OnActionSuccess="@(e => OnSuccess(e, item.LineNo))"> // Pass additional argument required for filter and update data source
</EjsInPlaceEditor>
@code {
public void OnSuccess(ActionEventArgs args, int lineNo) // Event handler modified with accept the additional argument
{
Orders filterOrders = orders.Where((i, index) => i.LineNo.Equals(lineNo)).FirstOrDefault(); // Filter field matching item from datasource
filterOrders.SellQuantity = Int32.Parse(args.Value); // Update the modified value into datasource
}
}
Please find the below sample, based on your requirement.
|
<EjsInPlaceEditor Mode="@mode" OnActionSuccess="@(e => OnSuccess(e, item.LineNo))">
</EjsInPlaceEditor>
|
<EjsInPlaceEditor Mode="@mode">
<InPlaceEditorEvents OnActionSuccess="@(e => OnSuccess(e, item.LineNo))"></InPlaceEditorEvents>
</EjsInPlaceEditor>
|
<EjsInPlaceEditor Mode="@mode">
<InPlaceEditorEvents OnActionSuccess="@(e => OnSuccess(e, item.LineNo))"></InPlaceEditorEvents>
</EjsInPlaceEditor>
|
<EjsInPlaceEditor Mode="@mode">
<InPlaceEditorEvents TValue="string" OnActionSuccess="@(e => OnSuccess(e, item.LineNo))"></InPlaceEditorEvents>
</EjsInPlaceEditor>
|
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.