This is a migrated thread and some comments may be shown as answers.

Getting bound values from other widgets

1 Answer 73 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Randy Hompesch
Top achievements
Rank 1
Randy Hompesch asked on 24 Apr 2019, 10:31 AM

Hi,

I have a async  upload control as shown below. It's on a razor page. I also have a couple of dropdownlists. When my SaveTraitFiles function is called, I need the bound value of the dropdown's selected value in my function. Right now it's always zero because of the async on the upload. If I remove the asyc and just process uploaded files on a submit, I get the desired value from the dropdown's bound property. Is there some magic sauce that I need to pour on this to get the async upload to get receive bound values of other controls?

Thanks ... Ed

 

 

@(Html.Kendo().Upload()
    .Name("traitFiles")
    .Async(a => a
        .SaveUrl("/Admin/UploadCertFiles?handler=SaveTraitFiles")
        .RemoveUrl("/Admin/UploadCertFiles?handler=RemoveTraitFiles")
        .AutoUpload(true))
    .Validation(v => v.AllowedExtensions(new string[] { ".pdf", ".jpg" }))
 
)

1 Answer, 1 is accepted

Sort by
0
Joana
Telerik team
answered on 29 Apr 2019, 06:30 AM
Hello Randy,

Basically, Kendo UI Async Upload provides saveField configuration option that points to the submitted form field. Could you please try this option set to the parameter in the controller and let me know if the issue is resolved?

https://docs.telerik.com/kendo-ui/api/javascript/ui/upload/configuration/async.savefield

You might find useful the following article that explains how to implement ajax requests in Razor Pages:

https://docs.telerik.com/kendo-ui/api/javascript/ui/upload/configuration/async.savefield

Regards,
Joana
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
Upload
Asked by
Randy Hompesch
Top achievements
Rank 1
Answers by
Joana
Telerik team
Share this question
or