<ejs-numerictextbox #default value="10" (focus)=focusHandler($event) (blur)=blurHandler($event) [showSpinButton]="false" ></ejs-numerictextbox> |
export class AppComponent {
@ViewChild('default')
public numericObj: NumericTextBoxComponent;
public focusHandler(args: any) :void {
this.numericObj.showSpinButton = true;
this.numericObj.dataBind();
}
public blurHandler(args: any) :void {
this.numericObj.showSpinButton = false;
this.numericObj.dataBind();
}
}
|
<SfNumericTextBox TValue="int?" Value=10 ShowSpinButton="@numericValue">
<NumericTextBoxEvents TValue="int?" Focus="FocusHandler" Blur="BlurHandler"></NumericTextBoxEvents>
</SfNumericTextBox>
@code{
public bool numericValue { get; set; } = false;
public void FocusHandler(Syncfusion.Blazor.Inputs.NumericFocusEventArgs args)
{
this.numericValue = true;
}
public void BlurHandler(Syncfusion.Blazor.Inputs.NumericBlurEventArgs args)
{
this.numericValue = false;
}
}
|