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

Progress Indicator on PopUp Window not displaying

3 Answers 312 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 23 May 2016, 09:52 PM

I have a grid where I have a popup form defined to edit a row.  Everything (finally) is working correctly *EXCEPT* the In-Progress spinner never displays upon submit.

Grid definition:

@(Html.Kendo().Grid<BomViewModel>()
        .Name("bom-prGrid-kendoGrid")
        .HtmlAttributes(new {@class = "prGrid"})
        .ClientRowTemplate("")
        .Columns(columns =>
        {
            if (Model.StatusDisplay.Equals("Started")) { columns.Command(cmd => cmd.Edit()).Width(80); }
            columns.Bound(g => g.BomId).Hidden();
            columns.Bound(g => g.IsEditable).Hidden();
            columns.Bound(g => g.Row).Width(75).Title("Row");
            //... Some columns removed for brevity ...//
        })
        .DataSource(dataSource => dataSource
            .Ajax()
            .Model(model => { model.Id(g => g.BomId); })
            .PageSize(100)
            .Read(r => r.Action("GetCloneAssembly", "AjaxProductReuse").Data("ProductReuseGridReadData"))
            .Update(u => u.Action("UpdateBomItem", "AjaxProductReuse").Type(HttpVerbs.Post).Data("getUpdatedBomRowData"))
            .Events(e => e.Error("ajax_error").Sync("dataSource_sync").Change("dataSource_change"))
        )
        .Events(e => e.DataBound("onDataBound").Edit("onEdit").Save("onSave"))
        .Pageable(pager => pager
            .Input(true)
            .Numeric(true)
            .Info(true)
            .PreviousNext(true)
            .Refresh(true)
            .PageSizes(new int[] {100, 250, 500, 1000})
        )
        .ToolBar(toolbar =>
        {
        toolbar.Template(
                @<text>
                    <div class="container-fluid otherElements" style="padding-top: 5px; padding-bottom: 5px;">
                        @Html.Partial("_CloneAssembly", Model)
                    </div>
                </text>);
        })
        .Excel(excel => excel.FileName("ClonableBom.xlsx").Filterable(true).AllPages(true).ProxyURL(Url.Action("ExcelProxy", "AjaxProductReuse")))
        .Sortable()
        .Scrollable()
        .Filterable()
        .Editable(editable => editable.Mode(GridEditMode.PopUp).TemplateName("BOMForm").Window(w => w.Title("Manage BOM Item").Name("BOMForm")))
        .Resizable(resizing => resizing.Columns(true)).Reorderable(reorder => reorder.Columns(true))
        )

Javascript:

// Events as defined by the grid's .Event(...) settings...
function onEdit(e) {
    //Bind deactivate event to the Popup window to support conditional formatting
    e.container.data("kendoWindow").bind("deactivate", function() { conditionalFormattingAll(); });
}
function onSave(e) {
    debugger;
    kendo.ui.progress(e.container, true);
}
// End events...

Maybe I misunderstood all the docs, forums and such but the onSave(e) event handler should display a progress gif while the ajax call is in progress.  Am I completely off base here?

 

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 26 May 2016, 07:16 AM
Hello Keith,

In the following dojo example you can see that a progress indicator is displayed for a brief moment when it is shown within the "save" event:
Furthermore, if you use the following demo and attach handler for the "Save" event, the progress indicator is displayed once again correctly:
Here are the modifications of the above demo:
    .Events(ev=>ev.Save("onSave"))
    ....
 
<script type="text/javascript">
    function onSave(e) {
        kendo.ui.progress(e.container, true);
    }
     
    ....
 
    //simulating a delay
 [AcceptVerbs(HttpVerbs.Post)] 
 public ActionResult EditingPopup_Update([DataSourceRequest] DataSourceRequest request, ProductViewModel product)  
 
     System.Threading.Thread.Sleep(500);
     ...



Best Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Keith
Top achievements
Rank 1
answered on 26 May 2016, 05:00 PM

Please, please, please - do notice I have that EXACT CODE.  It does not work!  I'm not looking for an example of how to get something else that is not my code working.  I AM LOOKING FOR help with WHY the code does not work as advertised!

Also, I already responded to your answer and it never showed up here.  Why is that?

0
Konstantin Dikov
Telerik team
answered on 30 May 2016, 01:06 PM
Hello Keith,

Since the issue seems to be related with your scenario I suggest that we continue the communication in the opened support ticket.


Regards,
Konstantin Dikov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Grid
Asked by
Keith
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Keith
Top achievements
Rank 1
Share this question
or