Posted 13 Aug 2013 Link to this post
<style type=
"text/css"
>
li.ruUploading
{
display
:
none
;
}
2
block
</style>
<
telerik:RadAsyncUpload
runat
=
"server"
ID
"RadAsyncUpload2"
OnClientFileUploading
"OnClientFileUploading"
</
1) Add the below javascipt function
function
OnClientFileUploading(sender, args) {
var
fileextension = args.get_fileName().split(
'.'
).pop();
if
(fileextension !=
"jpg"
&& fileextension !=
"png"
) {
$telerik.$(args.get_row()).addClass(
"ruUploading"
);
alert(
"Please select file with extension .jpg or .png"
args.set_cancel(
true
sender._cancelUpload(args.get_row());
sender._updateCancelButton(args.get_row());
$telerik.$(
".ruRemove"
, args.get_row()).click();
else
"ruUploading2"
false
<script type=
"text/javascript"
OnClientValidationFailed(sender, args) {
".ruCancel"
).parent().remove();
"Allowed files extension are .jpg, .png"
</script>
Posted 15 Aug 2013 Link to this post
Posted 05 Sep 2013 Link to this post
Posted 06 Sep 2013 Link to this post
Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable =
() {
return
; }
Posted 10 Sep 2013 Link to this post
Posted 11 Sep 2013 Link to this post
).on(
'click'
,
"Cancel Clicked"
});