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

Finding out any changes to the RadAsyncUpload control by user or not? (Any file added/updated/deleted)

2 Answers 44 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Suresh
Top achievements
Rank 1
Suresh asked on 24 Jun 2016, 04:28 PM
Hi,
I want to find out changes to the controls on the form if any element is changed but without saving it if the user moves to the other pages I want to show the user to ‘some unsaved changes are there do you want to save it or not?’ something like to show to the user. For archiving this I am using the JavaScript. With this I was able to find out any changes to all the controls on the form except RadAsyncUpload control.
Can you please advise how can I find out the changes to this RadAsyncUpload control using javascript?
Thanks,

2 Answers, 1 is accepted

Sort by
0
Suresh
Top achievements
Rank 1
answered on 24 Jun 2016, 08:55 PM
Any update?
0
Ivan Danchev
Telerik team
answered on 29 Jun 2016, 11:03 AM
Hello Mohinder,

I am not sure exactly what changes to the RadAsyncUpload you aim at tracking, but you can listen for changes in its rendered elements with the help of the Mutation Observers. For example if the ID of your control is "RadAsyncUpload1" you can pass it to the observe method as shown below:
function pageLoad() {
    var target = document.getElementById('RadAsyncUpload1');
 
    MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
 
    var observer = new MutationObserver(function (mutations, observer) {
        console.log(mutations, observer);
        // ...
    });
 
    observer.observe(target, {
        subtree: true,
        attributes: true
        //...
    });
}


Regards,
Ivan Danchev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
AsyncUpload
Asked by
Suresh
Top achievements
Rank 1
Answers by
Suresh
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or