1.If a value is binded - it's only one way. User is unable to change the data of the Numeric Textbox.
Example :
<SfNumericTextBox TValue="int?" Min="1" Max="1000" Step="1" @ref="editAddMeasurementValue1" ValueChanged="onMeasurementChanged1" Value="@someBinding" ></SfNumericTextBox>
someBinding will prevent user for changing the value.
2. If a value is set directly to the NumericTextBox - it will not be rendered until User click the box.
Try as follow to recreate the bug:
1.Put the NumericTextBox inside a SfDialog
2. editAddMeasurementValue1.Value = 10;
Hi Yordan,
Based on your shared code example, we suggest you use the two-way binding instead of using value and valuechange event to the component to achieve your requirement.
Find the code example here:
<SfDialog Height="75%" Width="435px" Target="#target" ShowCloseIcon="true" @bind-Visible="Visibility"> <DialogTemplates> <Content> <div> <SfNumericTextBox TValue="int?" Min="1" Max="1000" Step="1" @ref="editAddMeasurementValue1" @bind-Value="@someBinding"> </SfNumericTextBox> </div> </Content> </DialogTemplates> <DialogEvents OnOpen="@BeforeDialogOpen" Closed="@DialogClosed"></DialogEvents> </SfDialog> |
Find the sample in the attachment:
Regards,
Sureshkumar P
Well..
Try follow :
someBinding = 10;
The edit wont change what it is showing.
Yordan, we apologize for the inconvenience you're experiencing with the binding not updating when you edit it. We understand that we have already provided you with a sample in our previous response. We kindly request you to check the sample and try to replicate the issue. If the issue still persists, please provide us with detailed steps to reproduce the issue so that we can investigate it further and provide an accurate solution.
My appology dear Sureshkumar P.
You are absolutely correct.
It is working as expected when called in right place.
The issue was on my side.
Again - Thank
Hi Yordan,
Thanks for the update. We are marking this as solved.
Regards,
Shereen