5 Answers, 1 is accepted
0
Hello Morten,
You could get the selected files list elements by the k-file class, that is assigned to each of them.
E.g.
Regards,
Dimiter Madjarov
Telerik
You could get the selected files list elements by the k-file class, that is assigned to each of them.
E.g.
var
len = upload.wrapper.find(
".k-file"
).length;
if
(len === 0) {
//no file selected
}
Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Morten
Top achievements
Rank 2
Iron
Iron
Iron
answered on 09 Sep 2014, 01:39 PM
Hi Dimiter
thanks for your reply. I'll do so, however, it could be great with a couple of new events on the upload widget:
selected (fired when all files have been added and the widget updated).
removed (fired when all files have been removed and the widget updated).
/Morten
thanks for your reply. I'll do so, however, it could be great with a couple of new events on the upload widget:
selected (fired when all files have been added and the widget updated).
removed (fired when all files have been removed and the widget updated).
/Morten
0
Hello Morten,
I am not exactly sure what do you mean by "all files have been added". Even when multiple files are selected at once, the select event will be fired, receiving an e.files parameter representing the current files. The second requirement could be implemented with a check in the remove event.
I wish you a great day!
Regards,
Dimiter Madjarov
Telerik
I am not exactly sure what do you mean by "all files have been added". Even when multiple files are selected at once, the select event will be fired, receiving an e.files parameter representing the current files. The second requirement could be implemented with a check in the remove event.
I wish you a great day!
Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0

Morten
Top achievements
Rank 2
Iron
Iron
Iron
answered on 10 Sep 2014, 09:27 AM
hi Dimiter,
in the select/remove events (of any of my 6 individual upload widgets on the form) I'm checking if the form is valid using jquery.
Part of the validation is checking that all required upload widgets has a selected file. I'm checking if a required upload widget has a file by checking for "k-file" (as you pointed out). Trouble is (I think) that the "k-file" has not been added to the upload widget markup at time of "select event".
To handle this I using a simple settimeout, however, if the widget had an event like "render complete" / "all files added" I could put my code here. Hope I'm clear. And btw I love working with kendoui. ....i.. great work.
/Morten
in the select/remove events (of any of my 6 individual upload widgets on the form) I'm checking if the form is valid using jquery.
Part of the validation is checking that all required upload widgets has a selected file. I'm checking if a required upload widget has a file by checking for "k-file" (as you pointed out). Trouble is (I think) that the "k-file" has not been added to the upload widget markup at time of "select event".
To handle this I using a simple settimeout, however, if the widget had an event like "render complete" / "all files added" I could put my code here. Hope I'm clear. And btw I love working with kendoui. ....i.. great work.
/Morten
0
Hello Morten,
Thank you for the clarification and for the nice words. I will pass the suggestion to the developers team. Indeed at the moment using a setTimeout call is the suggested approach.
Regards,
Dimiter Madjarov
Telerik
Thank you for the clarification and for the nice words. I will pass the suggestion to the developers team. Indeed at the moment using a setTimeout call is the suggested approach.
Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!