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>
|