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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:





149285 Nov 20,2019 03:33 PM UTC Nov 21,2019 05:43 AM UTC Blazor 2
Tags: File Upload
Armando Costa
Asked On November 20, 2019 03:38 PM UTC

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 ?

Armando Costa
Replied On November 21, 2019 12:34 AM UTC

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

sorry for posting

Saranya Dhayalan [Syncfusion]
Replied On November 21, 2019 05:43 AM UTC

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. 
Saranya D 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon