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

complete event after remove operation not fired

3 Answers 210 Views
Upload
This is a migrated thread and some comments may be shown as answers.
frederic
Top achievements
Rank 1
frederic asked on 28 Mar 2017, 08:33 AM

Hi team,

The complete event is not fired after a remove operation. Why ?

I need to do some data consolidations after a remove operation by looping thru .k-file.k-file-success <li>

At present (kendo 2016.1.226), I was using the success event to do so, and it was ok.

Now (updrade to kendo 2017.1.223), It seems that a .k-file.k-file-success <li> removal is deffered and so is still present on success event.

 

Please advise,

 

Best regards.

 

 

3 Answers, 1 is accepted

Sort by
0
Ivan Danchev
Telerik team
answered on 29 Mar 2017, 07:53 AM
Hello Frederic,

Indeed the k-file-success class is still present by the time the success event fires following the remove event. As a workaround you could use a flag in the remove event and then execute your code that checks for the presence of selected files with a slight delay (needed for the files to be removed) by using the setTimeout method:
var isRemove = false;
 
function onSuccess(e) {
    if (isRemove) {
        isRemove = false;
        setTimeout(function () {
            //...
        }, 100);
    }
}
 
function onRemove(e) {
    isRemove = true;
}


Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
frederic
Top achievements
Rank 1
answered on 30 Mar 2017, 07:35 AM

Hi Ivan,

Thank you for your prompt answser with the workaround. Actually, this is the one I already have implemented.

Woudn't it be nice to have a sort of complete event for remove operations ?

Best regards.

0
Accepted
Ivan Danchev
Telerik team
answered on 31 Mar 2017, 01:17 PM
Hello Frederic,

We agree that it would be helpful in scenarios similar to yours. We would suggest logging this as a feature request in our public Feedback Portal and voting for it.

Regards,
Ivan Danchev
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Upload
Asked by
frederic
Top achievements
Rank 1
Answers by
Ivan Danchev
Telerik team
frederic
Top achievements
Rank 1
Share this question
or