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

Deferred object in remove

1 Answer 69 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 15 Mar 2016, 06:12 PM

Hi,

I've run into a bit of a snag within the onRemove javascript method.  We have a custom confirm dialog in our application and I'd like to trigger that when removing files from the upload, there does not seem to be any support in the remove method for deferred objects.  I'm just not sure how I can proceed.  Should I try to override the click function on the remove button so it triggers a different method that then triggers the remove event of the actual upload control?  Is there a way to bypass the javascript onRemove, but still process the rest of the remove logic?  Is it possible to have the remove workflow delay until my deferred dialog box has completed?

 

Thanks,

Kevin

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 16 Mar 2016, 07:57 AM

Hello Kevin,

You are correct that providing a deferred object is not supported at the moment in the remove action. A possible approach would be to use a flag variable and prevent the remove event depending on it. Here is a small example of this.

Regards,
Dimiter Madjarov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Upload
Asked by
Kevin
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or