Using a Grid and a Fileuploader on a column to receive images.
I need the current row "CodArtigo" to be the name of the uploaded file.
...
< GridColumns>
< GridColumn HeaderText="Foto" TextAlign="TextAlign.Center" Width="60" AllowEditing="false">
< Template>
@{
var artigo = (context as Artigos);
< EjsUploader ID="UploadFiles" DropArea=".control-fluid" MaxFileSize=104857600>
< UploaderAsyncSettings SaveUrl="api/Default/Save" RemoveUrl="api/Default/Remove" ChunkSize=500000>
< UploaderEvents FileSelected="@(()=>UpLoadClicked(??? , artigo.CodArtigo))" BeforeRemove="@Remove">< /UploaderEvents>
< /EjsUploader>
< /div>
}
< /Template>
< /GridColumn>
@{
var artigo = (context as Artigos);
}
@{
var artigo = (context as Artigos);
}
...
void UpLoadClicked(SelectedEventArgs args, ??? string artigo) {
// custom parameter in the selected event
args.CurrentRequest = new List<object> { new { FileName = ????artigo} };
}
How can I do this ?