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

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book