We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

how to pass a file name from current grid row to save the image

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>
...
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 ?

2 Replies

AC Armando Costa November 20, 2019 04:34 PM

Never mind ....
Just needed to change
(()=>UpLoadClicked(??? , artigo.CodArtigo)
to
(args)=>UpLoadClicked(args, artigo.CodArtigo)


sorry for posting


SD Saranya Dhayalan Syncfusion Team November 20, 2019 09:43 PM

Hi Armando, 
 
Thanks for the update. Please let us know if you need any assistance in Syncfusion product. We are always happy to assist you. 
 
Regards, 
Saranya D 


Loader.
Live Chat Icon For mobile
Up arrow icon