Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
146451 | Aug 4,2019 07:21 PM UTC | Aug 6,2019 08:03 PM UTC | Blazor | 4 |
![]() |
Tags: File Upload |
@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()
{
}
} |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.