Good day to all.
I would like to ask, on how could I hide the default Kendo generated select button, hide it, then trigger the click event in mySelectButton's click?
Thank you in advance for your immediate assitance.
17 Answers, 1 is accepted
Nevertheless this will cause issue in some Internet Explorer versions, which have a security feature to prevent uploading files that are not selected purely by user interaction. This applies to <input type="file' /> elements in general.
How could I hide the generated select button in kendo Upload?
and trigger it to my custom button?
You could access the button by it's k-upload-button class and set it's visibility to hidden. Then you could trigger the click event of the input field.
As stated previously the approach is not supported because it will cause security issues in some browsers.Regards,
if I will set to hide the k-upload-button class, what event could I put it?
when I tried to put it on 'select' event in kendo upload. The program stops (hang).
Can you give me a sample code or solution on how could I hide it in a proper way?
Thank you in advance and God bless...
Thanks for your assistance..
But what all I need is to hide the select button, and put it on my custom button (eg. mySelectButton).
I want to hide the select button generated by kendo from the start before I select I file, and show the custom mySelectButton to choose a file for upload.
Thank you in advance for your kind help...
Your example doesn't show anything. It appears blank.
I need the upload to allow multiple files, disable auto upload and hide the upload file button which appears after you select a file.
I can trigger the upload button in a custom button using $(".k-upload-selected").trigger('click');
But I need to hide the upload file button when auto upload is disabled so users can't upload the file until it's triggered from the custom button.
Is this possible?
It doesn't show anything, because the requested demo was to hide the upload "Select" button.
Regarding the current question, this functionality is possible. You could access the upload button via it's k-upload-selected CSS class and hide it.
Following the "hide the Upload button" question, what event would you use to hide 'clear' and 'upload' buttons (.k-upload-selected .k-clear-selected)? Seams like onSelect event buttons aren't rendered yet.
You can use the Complete event of the Upload widget, which is triggered, once the file is uploaded and the widget is idle. Please refer to the following dojo example:
Telerik by Progress
Thank you for the response. My case is a bit different. I have autoUpload: false.
What i'm trying to accomplish is to do client form validation on form submit first, and if successful - trigger upload event:
Than in the upload success event - submit the form.
So, basically, I wan't all chains of event to happen on form "Submit" button click, and avoid having other buttons (like "clear" or "upload") on the form.
Please find the modified dojo example below, where the Clear and Upload buttons are hidden with style, in combination with the usage of the upload method:
Telerik by Progress
Thank you for reply, but your example link seams broken. Can you please re-post?
Excuse me for the broken link. Below you can find the dojo example:
Telerik by Progress
I have a similar requirement - I have a custom submit button - I need to do some validation on clicking it and then trigger the upload. But I want this same functionality in @progress/kendo-react-upload component , instead of jquery.
I am able to hide the buttons using showActionButtons: false, but not able to get any config, which would give me a handle to trigger upload. Tried $(".k-upload-selected").click() from within my react app, but $(".k-upload-selected") returns null, when showActionButtons: false, unlike the case when showActionButtons: true.
However, this would not be the ideal approach to use $(".k-upload-selected").click() from within my react app.
Please let me know how to trigger upload on click of custom button in kendo-react-upload component ?
Could you please post your question in the React forum, as this is the Kendo UI for jQuery. Mixing the technologies would change the focus of the thread and make it less helpful:
Thank you in advance!