ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Upload file to the server inside Grid inline edit row
Title:
B
I
{code}
?
Is it possible to do a Grid inline File Upload , the file name as a Value shown in the Grid with an Upload Button. I tried with an action in the controller but the Problem I loose all the Data already entered by the user when editing in the Grid.
Save Changes
Cancel
imen
asked at 26 May 2020
Answers
B
I
{code}
?
You could upload the file and put the file id in a hidden input inside the row and when the user click Save only the fileId will be posted we actually have a demo for Grid inline editing with file upload, you can see it here: https://prodinner.aspnetawesome.com/Meal ( you can also download the code ) it might be a bit more complex than what you need since it also uses Dropzone.js and cropper.js in `ChangePicture.cshtml` you can see `parentInp.val(data.name);` this is where we set the fileName into the hidden input inside the row, in `Meal/Index.cshtml` the name of the hidden input is sent to the upload/crop popup using this line `awe.open('changePicture', { params: { id: picid } });` you can remove the grid's `.CustomRender("proUtils.inlineMeal")` mod to make it look simpler (table layout)
Save Changes
Cancel
Omu
answered at 26 May 2020
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK