Hi Alexey,
Greetings from Syncfusion support.
We can achieve the requested requirement by setting the readonly attribute to the input element as mentioned in the below code example,
|
@using Syncfusion.Blazor.Inputs
<SfNumericTextBox ID="numeric" TValue="int?" CssClass="custom" @bind-Value="@textvalue">
<NumericTextBoxEvents TValue="int?" Created="OnCreate"></NumericTextBoxEvents>
</SfNumericTextBox>
@code{
[Inject]
protected IJSRuntime JsRuntime { get; set; }
public int? textvalue { get; set; } = 5;
public void OnCreate()
{
JsRuntime.InvokeVoidAsync("OnCreated", "numeric");
}
}
<style>
.custom .e-control.e-numerictextbox.e-input{
pointer-events:none;
}
</style> |
|
window.OnCreated = function (id) {
document.getElementById(id).setAttribute("readonly", true);
} |
For your convenience, we have prepared the sample and attached it below.
Regards,
Berly B.C