NumericTextBoxEvents Error
Hi team,
I'm receiving this error based on NumericTextBoxEvents.
Hereunder is my code..
********Razor
EditType="EditType.DefaultEdit"
Width="140">
*********Code Block
public async Task OnValueChangeQuantity(Syncfusion.Blazor.Inputs.ChangeEventArgs
{
QuantityValue = args.Value;
}
Did I missed something?
Regards,
Tyrone
SIGN IN To post a reply.
3 Replies
RN
Rahul Narayanasamy
Syncfusion Team
July 2, 2021 04:54 AM UTC
Hi Tyrone,
Greetings from Syncfusion.
Query: I'm receiving this error based on NumericTextBoxEvents.
We have validated your query and we suspect that you have defined the NumericTextBoxEvents outside the SfNumericTextBox(like below codes) in EditTemplate which causes the reported problem.
|
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" TextAlign="TextAlign.Right" EditType="EditType.NumericEdit" Width="120">
<EditTemplate>
<SfNumericTextBox ID="Freight" TValue="double" @bind-Value="@((context as Order).Freight)">
</SfNumericTextBox>
<NumericTextBoxEvents TValue="double" ValueChange="OnValueChangeQuantity"></NumericTextBoxEvents> //defined outside the SfNumericTextBox
</EditTemplate>
</GridColumn> |
You can resolve the problem by defining the NumericTextBoxEvents inside the SfNumericTextBox like below. Also, you have defined EditType for Numeric column as DefaultEdit. For Numeric column, the EditType will NumericEdit. Find the below code snippets for your reference.
|
<GridColumn Field=@nameof(Order.Freight) HeaderText="Freight" TextAlign="TextAlign.Right" EditType="EditType.NumericEdit" Width="120">
<EditTemplate>
<label class="e-float-text e-label-top">Freight</label>
<SfNumericTextBox ID="Freight" TValue="double" @bind-Value="@((context as Order).Freight)">
<NumericTextBoxEvents TValue="double" ValueChange="OnValueChangeQuantity"></NumericTextBoxEvents>
</SfNumericTextBox>
</EditTemplate>
</GridColumn> |
Please let us know if you have any concerns.
Regards,
Rahul
TY
Tyrone
July 3, 2021 12:42 PM UTC
Thanks Rahul, it worked now.
RN
Rahul Narayanasamy
Syncfusion Team
July 5, 2021 04:43 AM UTC
Hi Tyrone,
Thanks for the update.
We are happy to hear that the provided solution was helpful to achieve your requirement.
Please get back to us if you need further assistance.
Regards,
Rahul
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
TY Tyrone
- Jul 1, 2021 05:50 PM UTC
- Jul 5, 2021 04:43 AM UTC