This is a migrated thread and some comments may be shown as answers.

How to add a Indeterminate ProgressBar via my controller

1 Answer 225 Views
ProgressBar
This is a migrated thread and some comments may be shown as answers.
SkyBlue
Top achievements
Rank 1
SkyBlue asked on 26 Dec 2017, 09:36 AM

My controller will start several async method, then my cshtml will show a long time white page. I do not want it.

I want to add a a Indeterminate ProgressBar when these async task is running, and when the task is completed, I want to hide this progressbar.

Thanks.

Xavier

1 Answer, 1 is accepted

Sort by
0
Ivan Zhekov
Telerik team
answered on 26 Dec 2017, 11:30 AM
Hello, Xavier.

You can add indeterminate progress bar with the following razor syntax:

@(Html.Kendo().ProgressBar()
    .Name("pageProgress")
    .Value(false)
)

or html / js

<div id="pageProgress"></div>
 
<script>
var pageProgress = $("#pageProgress").kendoProgressBar({
    value: false
}).data("kendoProgressBar")
</script>

Whether you create that progress bar on the fly (with javascript) or initially (with razor), you can show it and hide it when the async tasks start and end.

Regards,
Ivan Zhekov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
ProgressBar
Asked by
SkyBlue
Top achievements
Rank 1
Answers by
Ivan Zhekov
Telerik team
Share this question
or