从控制器方法调用时,进度条不会消失。 [英] Progress bar when called from controller method is not going away.

查看:82
本文介绍了从控制器方法调用时,进度条不会消失。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,



我正在从一个很棒的网格中调用控制器方法,如下所述。



 @(Html.Awe()。Grid(documentGridId)
// .Mod(o => o.Custom(gridLoading1)。ColumnsSelector())
。 Url(Url.Action(GridGetItems,Document))
.Parameter(DocumentFolder,Model.Item1)
.Parameter(DocumentParent,Model.Item2)
。父(connID,p1)
。可缩减(true)
.Height(200)
.ColumnWidth(120)
.PageSize(25)
.Groupable(false)
.Columns(
columns.ToArray()



和控制器方法我调用了Functions.SendProgress()来获取进度条。一旦显示它不会消失。必须从控制器调用什么才能使进度条在100%完成后消失。

 public ActionResult GridGetItems(GridParams g,string parent,string DocumentFolder,string p1, string DocumentParent,bool?restore)
{
Functions.SendProgress(Loading Files,10,100,p1);

//方法代码继续

Functions.SendProgress(Loading Files,100,100,p1);

返回Json(模型);
}



请告诉我。迫切需要帮助:(。



我尝试过:



尝试调用

函数ProgressBarModal(showHide){
调试器;
if(showHide ==='show'){
$('#mod-progress')。modal ('show');
if(arguments.length> = 2){
$('#progressBarParagraph')。text(arguments [1]);
}

window.progressBarActive = true;

} else {
$('#mod-progress')。modal('hide');
window.progressBarActive = false;
}
}


加载网格后的
。但它不是正确的方法,因为我们没有办法确定是否网格是否加载。



我必须从控制器方法本身调用一些方法来隐藏进度条。请帮助。

解决方案

('#mod-progress')。modal('show');
if(arguments.length> = 2){

(#progressBarParagraph)文本(参数[1])。
}

window.progressBarActive = true;

} else {


('#mod-progress')。modal('hide');
window.progressBarActive = false;加载网格后
}
}



。但它不是正确的方法,因为我们没有任何方法来确定是否加载了网格。



我必须从控制器方法中调用一些方法本身隐藏进度条。请帮忙。


Hello,

I am calling a controller method from an awesome grid as mentioned below.

@(Html.Awe().Grid(documentGridId)
       // .Mod(o => o.Custom("gridLoading1").ColumnsSelector())
        .Url(Url.Action("GridGetItems", "Document"))
        .Parameter("DocumentFolder", Model.Item1)
        .Parameter("DocumentParent", Model.Item2)
        .Parent("connID", "p1")
        .Resizable(true)
        .Height(200)
        .ColumnWidth(120)
        .PageSize(25)
        .Groupable(false)
        .Columns(
            columns.ToArray()
        )
)


And in controller method I have called Functions.SendProgress() to get the progress bar. Once displayed its not going away. What has to be called from the controller so that the progress bar goes away after 100% completion.

 public ActionResult GridGetItems(GridParams g, string parent, string DocumentFolder, string p1, string DocumentParent, bool? restore)
        {
Functions.SendProgress("Loading Files", 10, 100, p1);

//Method code continues

Functions.SendProgress("Loading Files", 100, 100, p1);

   return Json(model);
        }


Please let me know. Help needed urgently :(.

What I have tried:

Tried calling

function ProgressBarModal(showHide) {
    debugger;
    if (showHide === 'show') {
        $('#mod-progress').modal('show');
        if (arguments.length >= 2) {
            $('#progressBarParagraph').text(arguments[1]);
        } 

        window.progressBarActive = true;

    } else {
        $('#mod-progress').modal('hide');
        window.progressBarActive = false;
    }
}


after grid is loaded. But its not the correct way since we don't have any way to determine whether the grid is loaded or not.

I have to call some method from the controller method itself to hide the progress bar. Please help.

解决方案

('#mod-progress').modal('show'); if (arguments.length >= 2) {


('#progressBarParagraph').text(arguments[1]); } window.progressBarActive = true; } else {


('#mod-progress').modal('hide'); window.progressBarActive = false; } }


after grid is loaded. But its not the correct way since we don't have any way to determine whether the grid is loaded or not.

I have to call some method from the controller method itself to hide the progress bar. Please help.


这篇关于从控制器方法调用时,进度条不会消失。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆