@using Syncfusion.EJ2.Blazor.Inputs
@using Syncfusion.EJ2.Blazor.Popups
@using Microsoft.AspNetCore.Components.Forms;
@if (this.IsVisible)
{
<EjsDialog id="dialog" header=@("Analysis") width="800px" isModal=@true allowDragging=@true ShowCloseIcon=true>
<EditForm Model="@model" OnValidSubmit=@(() => this.Save())>
<div class="form-group row mt-2">
<label for="Attachments" class="col-2 col-form-label">Attachments:</label>
<div class="col-4">
<EjsUploader ID="UploadFiles"
DropArea=".control-fluid"
maxFileSize="2000000">
<UploaderEvents OnUploadStart=this.OnFileUpload></UploaderEvents>
</EjsUploader>
</div>
</div>
<button @onclick=@(() => this.IsVisible = false)>click</button>
</EditForm>
</EjsDialog>
}
<button @onclick=@(() => this.IsVisible = true)>click</button>
@code{
public EditModel model = new EditModel();
public int? numericVale { get; set; } = 10;
public UploaderAsyncSettings AsyncSettings { get; set; } = new UploaderAsyncSettings
{
};
public bool IsVisible { get; set; } = false;
public void OnIconClose(BeforeCloseEventArgs args)
{
args.Cancel = true;
this.IsVisible = false;
}
public void ValueChange(ChangeEventArgs args)
{
Console.WriteLine(args.Value);
}
public class EditModel
{
}
public void OnFileUpload(UploadingEventArgs arg)
{
arg.Cancel = true;
}
public void Save()
{
}
} |