python ruby-programming-language Smalltalk Vue.js Knockoutjs TypeScript JavaScript, OOPs JavaScript Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 8,7,6,5,4 and 2 Interview Questions and Answers Angular 4 Angular 2 AngularJs 1.x NodeJs Perl Programming R Programming RequireJs Rust Programming Backbonejs closure programming language go-programming-language kotlin-programming-language
Kendo ui upload events

Kendo ui upload events

@using (Html.BeginForm("UploadSubscribers", "Connect", FormMethod.Post, new { id = "IsValid", enctype = "multipart/form-data" }))
{
    <div class="panel panel-info">
        <div class="panel-heading">
            <h3 class="panel-title">
                Upload excel files for subscribers and subscriptions.
            </h3>
        </div>
        <div class="panel-body">
            <div class="row">
                <div class="col-sm-9">
                    @(Html.Kendo().Upload()
                    .Name("files")
                    .Multiple(false)
                    .HtmlAttributes(new { required = true })
                    .Events(events => events
                    .Cancel("onCancel")
                    .Complete("onComplete")
                    .Error("onError")
                    .Progress("onProgress")
                    .Remove("onRemove")
                    .Select("onSelect")
                    .Success("onSuccess")
                    .Upload("onUpload")
                    )
                </div>
            </div>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="pull-right">
        <button type="submit" id="btnExcelUpload" class="btn btn-primary">Upload</button>
        <a id="btnCancel" class="btn btn-primary">Cancel</a>
    </div>
    <div class="clearfix"></div>
}

<script>
    var onSelect = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:..
        }
    };

    var onCancel = function (e) {
        if (e !== undefined && e !== null) {
            var window = $("#window");
            if (window !== undefined && window !== null) {
                window.data("kendoWindow").close();
            }
        }
    };

    var onComplete = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:as per you.
        }
    };
    var onError = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:as per you.
        }
    };
    var onProgress = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:as per you.
        }
    };
    var onRemove = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:as per you.
        }
    };
    var onSuccess = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:as per you.
        }
    };
    var onUpload = function (e) {
        if (e !== undefined && e !== null) {
            //TODO:as per you.
        }
    };
</script>
ANIL SINGH

Hi there! Welcome to my blog. My name is Anil Singh. I'm a author of this blog. For more detail about me, kindly refer to this link..
My Blogs - http://code-sample.com and http://code-sample.xyz
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like
www.code-sample.com/. Powered by Blogger.
ASK Questions