I want to use the Upload function to read data in excel spreadsheet. The requirement is to show a pop up to prompt the user to delete any existing data before uploading any new data.
How to show this pop up. Could you please help?
Regards,
Monika
1 Answer, 1 is accepted
0
Aleksandar
Telerik team
answered on 18 Nov 2022, 05:53 AM
Hello Monica,
The Upload component is initialized from an <input type="file" /> elements. As such when the user clicks on it, <input type="file" /> element, the native browser dialog for selecting files is opened. Outside of such user-initiated events, file dialogs cannot be opened programmatically. Therefore you could wrap the Upload in an element, handle it's click event preventing the default action, prompt the user and then simulate the click of the Upload, for example:
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.